note 25428 modified in function.array-unique by danbrown
| From: | danbrown@php.net | Date: | Thu, 06 Nov 2008 15:10:08 +0000 |
| Subject: | note 25428 modified in function.array-unique by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-146235@lists.php.net to get a copy of this message | ||
Before I found the mysql distinct I had to make a nicer array from the keys/values that I got from
array_unique so.
<?php
$groups=array_unique($groups);
$newgroup[0]=reset($groups);
for ($x=1;$x<sizeof($groups);$x++)
{
$newgroup[$x]=next($groups);
}
?>
--was--
Before I found the mysql distinct I had to make a nicer array from the keys/values that I got from
array_unique so.
$groups=array_unique($groups);
$newgroup[0]=reset($groups);
for ($x=1;$x<sizeof($groups);$x++)
{
$newgroup[$x]=next($groups);
}
http://php.net/manual/en/function.array-unique.php