foreach sorting
| From: | Sebastian | Date: | Tue, 19 Apr 2005 15:29:25 +0000 |
| Subject: | foreach sorting | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-213384@lists.php.net to get a copy of this message | ||
when the if statement is true how do i make it appear as the last record in
the loop?
$tabarray = array('/games' => 'Games', '/news' =>
'News');
foreach ($tabarray AS $loc => $item)
{
if(strpos($loc, $_SERVER['REQUEST_URI']) !== false)
{
$tabmenulist .= '<td class="tabsel"><a
href="'.$loc.'">'.$item.'</a></td>
}
else
{
$tabmenulist .= '<td class="tabdel"><a
href="'.$loc.'">'.$item.'</a></td>
}
}