i have this array:
Array
(
[15] => 13.1
[16] => Mark one answer
[19] => You see a car on the hard shoulder of a motorway with a HELP pennant displayed. This means the driver is most likely to be
[20] => a disabled person first aid trained
[21] => a foreign visitor
[22] => a rescue patrol person
[25] => DES s15, HC r278);
How do i get it to sort the keys from 0? to get this: i know there is a function, but my head is burned, the sort function doesn't fit my needs since they rearrange values, and i need them to be conserved.
Array
(
[0] => 13.1
[1] => Mark one answer
[2] => You see a car on the hard shoulder of a motorway with a HELP pennant displayed. This means the driver is most likely to be
[3] => a disabled person first aid trained
[4] => a foreign visitor
[5] => a rescue patrol person
[6] => DES s15, HC r278);
I think you're looking for array_values
$arr = array_values($arr);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With