-3

Possible Duplicate:
Get variable from PHP to JavaScript

I am working in wikipedia api, how to search query with two words like "new york", as it is returning no image when using two words ?

Community
  • 1
  • 1

1 Answers1

2
$.getJSON("http://en.wikipedia.org/w/api.php?action=mobileview&format=json&page=<?php echo $query ?>&redirect=no&sections=0&prop=text&sectionprop=toclevel%7Clevel%7Cline%7Cnumber%7Cindex%7Cfromtitle%7Canchor&callback=?", function(json) { 

That is use <?php echo $query ?> should work....

Siddharth
  • 818
  • 5
  • 12
  • 25