Pull your latest tweet with PHP

Found some better code to pull your latest tweet:

<?php
	$username='thatbradleyguy'; // set user name
	$format='json'; // set format
	$tweet=json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}")); // get tweets and decode them into a variable
	echo $tweet[0]->text; // show latest tweet
?>