Journal tmhsiao's Journal: Explain this to me. Win prizes.
In going over some code that I need to put up, I found the following function (names have been changed to protect the ignorant):
function my_uniq_array($myarray){
$temparray = array_unique($myarray);
$i=0;
foreach ($temparray as $value) {
$new_array[$i] = $value;
$i++;
}
return $newarray;
}
Can someone explain to me why it would be necessary to do such a thing?
function my_uniq_array($myarray){
$temparray = array_unique($myarray);
$i=0;
foreach ($temparray as $value) {
$new_array[$i] = $value;
$i++;
}
return $newarray;
}
Can someone explain to me why it would be necessary to do such a thing?
Explain this to me. Win prizes. More Login
Explain this to me. Win prizes.
Slashdot Top Deals