note 101066 deleted from language.types.array by thiago
| From: | thiago@php.net | Date: | Wed, 24 Nov 2010 12:01:50 +0000 |
| Subject: | note 101066 deleted from language.types.array by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174318@lists.php.net to get a copy of this message | ||
Note Submitter: thesurge0n
----
PLEASE CHECK THE BELOW POST FOR A MULTIDIMENSIONAL ARRAY I DID, THIS ONE JUST RETURNS THE $ROW ARRAY
KEY/VALUE PAIR WITH A RESTRICTION ON THE AMOUNT OF OUTPUT AND RETURNS OUTPUT IN A DIV.
while ($row = mysql_fetch_assoc($result))
{
/*removes username*/
unset($row['loginName']);
/*sort array*/
arsort($row);
$c=0;
foreach($row as $k => $v)
{
$c=$c+1;
echo "<div id='result' style='border:solid thin;'>$k
$v</div>";
if($c == "5")
{
break;
}
}
}