I have this code to tap into a twitter feed...
// Output tweets
$json = file_get_contents("http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=false&screen_name=*********&count=100", true);
$decode = json_decode($json, true);
$count = count($decode); //counting the number of status
for($i=0;$i<$count;$i++){
//echo $decode[$i]["text"]."<br><br>";
$text = $decode[$i]["text"]." ";
echo $text;
}
I want to access $text in another function. Can this be done?
foreach. I don't see anyforeachstatement in you code.