Possible Duplicate:
Changing a nested (multidimentional) array into key => value pairs in PHP
I have this array
[5] => Array
(
[completed_system_products_id] => 1
[completed_systems_id] => 76
[step_number] => 1
[product_id] => 92
[category] => hardware
[date_added] => 2011-05-03 13:44:01
)
[4] => Array
(
[completed_system_products_id] => 2
[completed_systems_id] => 76
[step_number] => 2
[product_id] => 62
[category] => hardware
[date_added] => 2011-05-03 13:44:51
)
[3] => Array
(
[completed_system_products_id] => 3
[completed_systems_id] => 76
[step_number] => 3
[product_id] => 104
[category] => hardware
[date_added] => 2011-05-03 13:44:56
)
[2] => Array
(
[completed_system_products_id] => 4
[completed_systems_id] => 76
[step_number] => 4
[product_id] => 251
[category] => hardware
[date_added] => 2011-05-03 13:48:56
)
How do i make the keys values the same as the [step_number] =>
so for example i want this outcome
[1] => Array
(
[completed_system_products_id] => 1
[completed_systems_id] => 76
[step_number] => 1
[product_id] => 92
[category] => hardware
[date_added] => 2011-05-03 13:44:01
)
[2] => Array
(
[completed_system_products_id] => 2
[completed_systems_id] => 76
[step_number] => 2
[product_id] => 62
[category] => hardware
[date_added] => 2011-05-03 13:44:51
)
[3] => Array
(
[completed_system_products_id] => 3
[completed_systems_id] => 76
[step_number] => 3
[product_id] => 104
[category] => hardware
[date_added] => 2011-05-03 13:44:56
)
[4] => Array
(
[completed_system_products_id] => 4
[completed_systems_id] => 76
[step_number] => 4
[product_id] => 251
[category] => hardware
[date_added] => 2011-05-03 13:48:56
)
1 Answer