using php how to get array result into below way,
Array
(
[3] => Array
(
[15] => 15
[16] => 16
[17] => 17
[18] => 18
[19] => 19
)
)
how to convert above array into below format,
Array
(
[0] => 15
[1] => 16
[2] => 17
[3] => 18
[4] => 19
)
array_values()
is your friend;
Presuming your array exists in a variable called $array
;
$newArray = array_values($array[3]);
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