How do I get / group indexes with equal keys in an array, for example:
Array
(
[field_label] => Array
(
[0] => Texto
[1] => Checkbox
[2] => URL
)
[field_type] => Array
(
[0] => text
[1] => checkbox
[2] => url
)
[field_value] => Array
(
[0] =>
[1] => valor_1 | Valor 1
valor_2 | Valor 2
[2] =>
)
[field_required] => Array
(
[0] => on
[1] => on
[2] => on
)
[field_order] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
)
I want the array to look like this:
array (size=3)
0 =>
array (size=5)
'field_label' => string 'Texto' (length=5)
'field_type' => string 'text' (length=4)
'field_value' => string '' (length=0)
'field_required' => string 'on' (length=2)
'field_order' => string '1' (length=1)
1 =>
array (size=5)
'field_label' => string 'Checkbox' (length=8)
'field_type' => string 'checkbox' (length=8)
'field_value' => string 'valor_1 | Valor 1 valor_2 | Valor 2 | valor_3 | Valor 3' (length=55)
'field_required' => string 'on' (length=2)
'field_order' => string '2' (length=1)
2 =>
array (size=5)
'field_label' => string 'URL' (length=3)
'field_type' => string 'url' (length=3)
'field_value' => string '' (length=0)
'field_required' => string '' (length=0)
'field_order' => string '3' (length=1)