Jump to content


Popular Content

Showing content with the highest reputation on 12/29/2018 in all areas

  1. 1 point
    The reason is that the keys haven't changed. You should use a foreach() loop where possible to iterate through arrays. I rarely ever use a for loop. If you would like to reassign the indices after the call to array_unique(), you can use array_values(). Then you can use a classic for() loop. $unique_even_numbers = array_values(array_unique($even_numbers));
  • Create New...