I am looking for more array help I’m sure this is an easy one but I can’t figure it out. I have an array returned from a form post that looks like this:
[php]Array
(
[position_1] => s1
[quantity_1] => q1
[position_2] => s29
[quantity_2] => q7
[position_3] => s53
[quantity_3] => q17
[position_4] => s76
[quantity_4] => q30
[position_5] =>
[quantity_5] =>
[position_6] =>
[quantity_6] =>
[position_7] =>
[quantity_7] =>
[position_8] =>
[quantity_8] =>
)[/php]
I would like to change it into an array where if position x and quantity x are both not == ‘’ the position value becomes the key of the new array and the quantity value becomes the value.
Thanks in advance.