<?php $tweets = getLatestTweets(); ?> <h3>Latest Tweets</h3> <?php foreach ($tweets as $tweet) { ?> <div class="twitter-entry row"> <div class="social-name-pic row"> <div class="col-md-2 twit-pic-holder"> <img src="<?php echo $tweet['user']->profile_image_url; ?> "> </div> <div class="col-md-10"> <div class="social-name">@<?php echo $tweet['user']->screen_name; ?> </div> <div class="social-date"><?php echo date("M d Y", strtotime($tweet['createdat'])); ?> | <?php echo date("H i A", strtotime($tweet['createdat'])); ?>
function ajax_getLatestTweets() { $tweets = getLatestTweets(1); echo json_encode($tweets[0]); exit(1); }