-1

I have a little problem, I want to sort my table :

I want this

array([1] => "value 1", [3] => "value 2", [5] => "value 3");

to become this

array([0] => "value 1", [1] => "value 2", [2] => "value 3");
Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126

1 Answers1

-1

I misread the question: corrected, try this way or use array_map or array_values;

foreach($a as $item){
    $newarray[] = $item;

}
print_r($newarray);
clearshot66
  • 2,240
  • 1
  • 7
  • 17