I want to return all "name" values from the requested Yahoo YQL result, but all I get is an empty page :( This is my code so far:
$input = $_GET['str'];
$yql = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%20='".$input."'";
$feed = file_get_contents($yql);
$xml = simplexml_load_string($feed);
echo $xml->query->results->place->name;
How can I parse and return all the XML values with the name "name"?
Returned XML structure sample: sample
Thank you very much for the help! :)