Is it possible to convert this array:
array(
'A' => 'B',
'C' => 'D',
)
To this array:
array(
array(
'A',
'B',
),
array(
'C',
'D',
),
)
Is it possible to convert this array:
array(
'A' => 'B',
'C' => 'D',
)
To this array:
array(
array(
'A',
'B',
),
array(
'C',
'D',
),
)
You are probably looking for the array_map
(builds pairings based on existing arrays, see Example #4 Creating an array of arrays on the manual page) and the array_keys
(all keys of an array) functions:
array_map(null, array_keys($array), $array));