Jump to content

Recommended Posts

  • Administrators
Posted

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};}
?>

  • Administrators
Posted

Where ever you have the code for your online list, you say it is on the home page so I would guess it is in the template for the homepage.

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...