I have a foreach which basicaly lists clients withe their username , password and package. now i have a forach running perfect BUT it keeps showing some of the users 3 time for some reason , the data file where its getting all the info does not have the client 3 times. So for some reason foreach echo is showing the same value or user 3 times and then goes on. and its only some users not all. (there are NO duplicates in the data source) pls help :)
Code :
foreach ($info->accountswithinfo->account as $realminfo):
$uncapped=$realminfo->isuncapped;
if ($uncapped=='False')
{
$username=$realminfo->username;
$password=$realminfo->password;
$packagename=$realminfo->{'package-name'};
$for=$realminfo->cap;
$cap=Round(("$for") / (1024 * 1024 * 1024), 2);
}
?>
<tr>
<?php
echo '<td class="blockcontentwhite sessionicon">',
'<td class="blockcontentwhite center">' . ("$username") . '</td>',
'<td class="blockcontentwhite center">' . ("$password") . '</td>',
'<td class="blockcontentwhite center">' . ("$cap GB") . '</td>',
'<td class="blockcontentwhite center">' . ("$packagename") . '</td>';
endforeach;
?>