By inverse I mean from the following:

```
$my_array = array(
    "header" => array(
        0 => "Header 1",
        1 => "Header 2"
    ),
    "paragraph" => array(
        0 => "Paragraph 1",
        1 => "Paragraph 2"
    )
);

```

to this:

```
$my_new_array = array(
    0 => array(
        "header" => "Header 1",
        "paragraph" => "Paragraph 1"
    ),
    1 => array(
        "header" => "Header 2",
        "paragraph" => "Paragraph 2"
    )
);

```

I know that I can do this:

```
$my_new_array = array();
foreach ( $my_array["header"] as $key => $header ){
    if ( !is_array( $my_new_array[ $key ] ) ){
        $my_new_array[ $key ] = array();
    }
    $my_new_array[ $key ]["header"] = $header;
}
foreach ( $my_array["paragraph"] as $key => $paragraph ){
    $my_new_array[ $key ]["paragraph"] = $paragraph;
}

```

But I was wondering if there was a quick PHP function to do this or a more optimal way. I couldn't find any such function in the PHP function directory, and i can't think of a more optimal way!

Cheers