Xtremer360 Posted September 9, 2011 Share Posted September 9, 2011 For some reason the time is always staying the same throughout the listing tweets even when there's posts with different times. What am I doing wrong? function getTwitterStatus($userid, $x) { $url = "http://twitter.com/statuses/user_timeline/$userid.xml?count=$x"; $xml = simplexml_load_file($url) or die("could not connect"); foreach ($xml->status as $status) { $text .= "<tr>"; $text .= "<th>" . date("m/d/Y - g:ia", strtotime($xml -> status[0] -> created_at)); "</th>"; $text .= "<td class=\"full\">" . $status -> text . "</td>"; $text .= "<td><img src=\"images/ball_grey_16.png\" class=\"block cr-help\" alt=\"\" title=\"Twitter Message\"/></td>"; } echo $text; } Quote Link to comment https://forums.phpfreaks.com/topic/246757-twitter-api-date-issues/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.