假设我有一个由3个数组(1-100可能)组成的多维数组,其中包含以下值:
['NAME'] => array(
[0] => 'Bob',
[1] => 'Mike'
),
['MIDDLE'] => array(
[0] => 'goes to',
[1] => 'hates'
),
['SUBJECT'] => array(
[0] => 'the movies.',
[1] => 'the swimmingpool.'
)
然后我想将这些值转换为8个数组:
[0] => array(
['NAME'] => 'Bob',
['MIDDLE'] => 'goes to',
['SUBJECT'] => 'the movies.'
),
[1] => array(
['NAME'] => 'Bob',
['MIDDLE'] => 'goes to',
['SUBJECT'] => 'the swimmingpool.'
),
[2] => array(
['NAME'] => 'Bob',
['MIDDLE'] => 'hates',
['SUBJECT'] => 'the movies.'
),
[2] => array(
['NAME'] => 'Bob',
['MIDDLE'] => 'hates',
['SUBJECT'] => 'the swimmingpool.'
),
etc.
任何人都能给我一个正确方向的暗示吗? 只是想不出来。