My array looks like this:
array( 0 => 'val', 2 => 'val', 3 => 'val', 5 => 'val', 7 => 'val' );
How can I reset the keys so it will go like 0, 1, 2, 3, 4?
0, 1, 2, 3, 4
Use array_values:
$reindexed_array = array_values($old_array);
1.4m articles
1.4m replys
5 comments
57.0k users