I'm using this to generate my twitter feed:
# Access as an object
$tweetText = $tweet->text;
$tweetDate = $tweet->created_at;
# Make links active
$tweetText = preg_replace("/(http:\/\/|www.)(([^\s<]{4,68})[^\s<]*)/", '<a href="http://$2$3" target="_blank">$1$2$4</a>', $tweetText);
# Linkify user mentions
$tweetText = preg_replace("/@(w+)/", '<a href="http://www.twitter.com/$1" target="_blank">@$1</a>', $tweetText);
# Linkify tags
$tweetText = preg_replace("/#(w+)/", '<a href="http://search.twitter.com/search?q=$1" target="_blank">#$1</a>', $tweetText);
# Output
echo $tweetText;
echo '<br><span>Posted: ';
echo $tweetDate;
echo '</span>';
echo '<br> <br>';
It currently shows the date the tweet was posted, is there a way to get it to show how long ago the tweet was posted, e.g 4 hours ago instead of a date?
$tweetDate
Currently prints Tue Apr 29 09:43:17 +0000 2014