PHP: Transforming Array Orientation : In PHP - Any Help for me in transforming array 
it's actually a query result from mysql DB


>     **Existing:** 
>     (
>     [ITEM] => Array
>             (
>                 [0] => PRODUCT A
>                 [1] => PRODUCT B
>                 [2] => PRODUCT C
>                 
>             )
>     
>     [REFERENCE] => Array
>             (
>                 [0] => 107AW3
>                 [1] => 204RS67O
>                 [2] => 25GTR56
>              
>             )
>     
>     **Wanted:** 
>      (
>         [0] => Array
>             (
>                 [ITEM] => Product A
>                 [REFERENCE] => 107AW3
>             )
>     
>         [1] => Array
>             (
>                 [ITEM] => Product B
>                 [REFERENCE] => 204RS67O
>             )
>     
>         [2] => Array
>             (
>                 [ITEM] => Product C
>                 [REFERENCE] => 25GTR56
>             )

What can I do to transform the array into the wanted one? 
a glance of info, it is actually a query from MySQL: 

    if ($result->num_rows > 0) {
            // output data of each row
            while($row = $result->fetch_assoc()) {
              $item_array[] = $row["item"];
              $reference_array[] = $row["reference"];  
          }
        } 
        
        table_content = array(	'ITEM'=>$item_array,
                          	    'REFERENCE'=>$reference_array);
        
        echo '<pre>'; print_r($table_content); echo '</pre>';

 

