I'm using this code:
<?php
$json_url = 'http://search.twitter.com/search.json?q=royal&wedding';
$ch = curl_init( $json_url );
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-type: application/json')
);
curl_setopt_array( $ch, $options );
$result = curl_exec($ch);
if (!empty($result)){
$json = json_decode($result);
foreach ($json->results[0]->text as $t){
var_dump($t);
}
}
?>
But i'm getting an invalid argument for the foreach??
Any ideas?