array help
Posted: Mon Dec 15, 2003 2:50 am
I have 2 arrays:
and
I want to place the values from the data array into the main array
so as to look like this:
Thanks, in advance, I'm either too tired or too stupid to figure this out right now.
-Garrett
Code: Select all
Array
(
їemployee_id] => 13351
їdata] => Array
(
їE001] => 40
їE021] => 10
їE022] =>
їE09B] =>
)Code: Select all
Array
(
їE001] => Array
(
їearnings_code] => E001
їdescription] => Regular Hours/Earnings
їearnings_type] => hours
)
їE021] => Array
(
їearnings_code] => E021
їdescription] => Overtime (1.5)
їearnings_type] => hours
)
їE022] => Array
(
їearnings_code] => E022
їdescription] => Double (2.0)
їearnings_type] => hours
)
їE09B] => Array
(
їearnings_code] => E09B
їdescription] => Holiday
їearnings_type] => hours
)
)so as to look like this:
Code: Select all
Array
(
їE001] => Array
(
їearnings_code] => E001
їdescription] => Regular Hours/Earnings
їearnings_type] => hours
їvalue] => 40
)
їE021] => Array
(
їearnings_code] => E021
їdescription] => Overtime (1.5)
їearnings_type] => hours
їvalue] => 10
)
їE022] => Array
(
їearnings_code] => E022
їdescription] => Double (2.0)
їearnings_type] => hours
їvalue] =>
)
їE09B] => Array
(
їearnings_code] => E09B
їdescription] => Holiday
їearnings_type] => hours
їvalue] =>
)
)-Garrett