I’m not sure I’ve worded the question very well, but basically I have a class with 3 functions that gets the profile image, real name, and latest tweet based on each element (twitter user names) in an array. What I am now trying to do is make it so each returned profile image when clicked, displays the the latest tweet from that particular person.
I don’t know how to make it so each user’s profile image is assigned/related to their tweet? At the moment the below code just outputs the profile image, name, and latest tweet of each of the twitter accounts defined in the array. Any help would be really appreciated.
Here is the code which executes the functions, along with the arrays used:
[php]$tweeters = array(‘JoeyEssex_’, ‘piersmorgan’, ‘BinkyFelstead’);
// Create all Tweeter objects
foreach ($tweeters as $i => $tweeter){
$tweeters[$i] = new Tweeter($tweeter, $tmhOAuth);
}
// Display all Tweeters
foreach ($tweeters as $tweeter){
echo ‘’;
echo '
Latest tweet from ’ . $tweeter->getName() . ‘:
’;
foreach ($tweeter->getTweets() as $tweet){
echo $tweet[‘text’] . ‘
’;
echo "Sent: " . $tweet[‘created_at’] . “
}
}[/php]
If you need to see the functions to answer this question then let me know. Cheers guys!