I am trying to overwrite [19] in my array, the first value every time. [19] will not always be the same as it populates off an ID that is passed into the array. I want to replace that first index with a new ID based on certain validation.
I've tried unsetting that value and replacing it but it creates a new entry (shown below).
<pre style='font-size:11px'>
[------- var dumping... -------]
arrcount: 2
Array
(
[19] => Array
(
[quantity] => 1
)
[] => 50
)
</pre>
Rather than have a new entry in the array like [] => 50, I would like to replace [19] with [50] while keeping the quantity value the same. Keeping in mind that these numbers are not static, they are dynamic in the case that it is whatever Id is passed based of outside validation.