Hello i have an multidimensional array
each of the array contains key of "id_category"
I am trying to store value of key "id_category"
while loop through the multidimensional array.
Here is the array & php compiler
https://paiza.io/projects/H8FwXLAZc438-XA-hnmNHQ?language=php
$save_id_category = [];
foreach($array as $ct){
$save_id_category[] = $ct['id_category'];
}
print_r($save_id_category); // this gets me only one record.
I can loop through all array & save data but that would be not good idea.
Please let me know if we have a better approach for this. Thanks