Jump to content

Logged in 3 times(solved)


mattsmith

Recommended Posts

  • Administrators

Add this just prior to your loop

$shown = array();

Add this to your loop for the users online.

if(in_array($pilot->pilotid, $shown))
{continue;}
else
{$shown[] = $pilot->pilotid;}

It should end up looking something like this

<?php
$shown = array();

foreach($usersonline as $pilot) {

if(in_array($pilot->pilotid, $shown))
continue;
else
$shown[] = $pilot->pilotid;

echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo " {$pilot->firstname} {$pilot->lastname};}
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...