Reg- array_unique
| From: | SenthilVelavan | Date: | Fri, 02 Aug 2002 07:54:26 +0000 |
| Subject: | Reg- array_unique | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-110788@lists.php.net to get a copy of this message | ||
Hello All,
I tried a program using array_unique.It shows different outputs in PHP4.06 and PHP4.22
Program :
<?php
$employee[0]='snp';
$employee[1]='snp';
$employee[2]='snp';
$yee=array_unique($employee);
while(list($i,$c)=each($yee))
{
echo "Index ".$i." Content".$c;
}
?>
Output :
PHP4.06
Index 0 Content snp
PHP4.22
Index 2 Content snp
Why the index is differed in two version?
Whether the function array_unique is handled in a different way in PHP4.22.
Any help is appreciated.
Advance thanks and regards,
SenthilVelavan.P