I ran into an interesting situation the other day where I was parsing an RSS into a SimpleXML object. I cannot recall the exact situation but I will replicate it below. Suppose you have an associative array with a key that that is not a valid variable name. This can happen if the key begins [...]
Get Trending Topics from Twitter
I recently had the need to get the trending topics on Twitter, and discovered it was really easy. Below is the code: [code]$url = "http://api.twitter.com/1/trends/1.json"; $data = json_decode(file_get_contents($url)); print_r($data); [/code]