3v4l.org

run code in 300+ PHP versions simultaneously
<?php $existing_array = [ "ROWID" =>[ 0 => 0, 1 => 1, 2 => 2 ], "First Name" => [ 0 => "BILLY", 1 => "SALLY", 2 => "TYLER" ], "Last Name" => [ 0 => "RAY", 1 => "SUE", 2 => "TERRIER" ], "Middle Name" =>[ 0 => "B.", 1 => "S.", 2 => "T." ] ]; $expected_array = ['ROWID'=>$existing_array['ROWID'],'First Name'=>$existing_array['First Name'],'Middle Name'=>$existing_array['Middle Name'],'Last Name'=>$existing_array['Last Name']]; print_r($expected_array);

preferences:
25.81 ms | 404 KiB | 5 Q