![]() |
|
|
+ Search |
![]()
|
Feb 14th, 2002 09:52
Ben Udall, J Fried,
This should work. It will also unset arrays with 0 or 1 values.
for ($i=1; $i<count($array); ++$i)
{
if ($array[$i] != $array[$i-1])
break;
}
if (count($array) == 0 || $i == count($array))
unset($array);