I've done some searches but can't seem to find someone with the same problem as I. I can't figure out how to change the key of an array that's beeing pushed into another array.
Example.
$array1
$array2
array_push($array1, $array2);
$array1 [
"0" [
//the data in array2
]
]
I want to change the key value where it says "0". Anyone know how I can do that?
array_push. Or do you want to change the kay after the element has been added?