Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
PHP

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?
This discussion has been archived. No new comments can be posted.

Explain this to me. Win prizes.

Comments Filter:

A morsel of genuine history is a thing so rare as to be always valuable. -- Thomas Jefferson

Working...