3v4l.org

run code in 300+ PHP versions simultaneously
<?php $project_archives = array( 'Bridge Work' => array( array( 'Name' => 'NJ Trunpike_Bridge Repair Work', 'Location' => 'New Jersey', 'State' => 'New Jersey' ), array( 'Name' => 'Honoapiilani Highway Bridge Truss', 'Location' => 'Maui', 'State' => 'Hawai' ), array( 'Name' => 'BlueCross Blueshield of Tennessee (Bridge)', 'Location' => 'Memphis', 'State' => 'Tennessee' ), array( 'Name' => 'Henderson Center Connector Bridge', 'Location' => 'Coquitlam', 'State' => 'British Columbia' ), ), 'Educational' => array( array( 'Name' => 'RTI TASS Complex Admin Bldg', 'Location' => 'Bluffdale', 'State' => 'Utah' ), array( 'Name' => 'Auburn High School', 'Location' => 'Auburn', 'State' => 'Washington' ), array( 'Name' => 'Reed College', 'Location' => 'Portland', 'State' => 'Oregon' ), array( 'Name' => 'Shorewood High School', 'Location' => 'Shoreline', 'State' => 'Washington' ), ) ); $testing = array(); foreach($project_archives['Bridge Work'] as $key=>$value) { $testing[$key]=$value['State']; } asort($testing); print_r($testing); $a=array(); foreach($testing as $key=>$value) { $a[] = $project_archives['Bridge Work'][$key]; } print_r($a);

preferences:
35.4 ms | 402 KiB | 5 Q