3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myArray = [ 'person_1@gmail.com' => [ '2017-01-05' =>[ 'this is line one', 'this is line two', ], '2016-05-05' => [ 'this is another line', 'and this is a fourth line' ], '2017-07-10' => [ 'more lines', 'yet another line' ], ], ['person_2@gmail.com'] => [ '2015-01-01' => ['line for person_2'], ] ]; foreach($myArray as $key=>$value){ ksort($myArray[$key]); } print_r($myArray);