Colin Brazier
asked on
Remove level of an array
ASKER
After I removed the initial numbers from the array names,
Array
(
[0] => KCL P
[1] => IRC 1
[2] => IRC 2
)
Array
(
[comp_code] => Other
[comp_desc] => Other
)
Other is the last option in each case.
$1DimensionalArray = array_map('current', $2Dimensionalarray);gives
Array
(
[0] => KCL P
[1] => IRC 1
[2] => IRC 2
)
$1DimensionalArray = array_reduce($2Dimensionalgivesarray, 'array_merge', array())
Array
(
[comp_code] => Other
[comp_desc] => Other
)
Other is the last option in each case.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It does - thanks Julian.
You are welcome.
ASKER
There might be a few more array questions coming up, I'm really struggling
Post away and then PM me
ASKER
Will do, I think I've made some progress though.
Cheers
Cheers
Open in new window
or
Open in new window