3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $inputArray = array(array("number"=>"+918800499626"), array("carrier"=>"asdasd"), array("number"=>"342423"), array("carrier"=>"assssssss")); $resultArray = array(); for($i = 0; $i < count($inputArray); $i++) { $resultArray[] = array("number"=>$inputArray[$i], "carrier"=>$inputArray[++$i]); } print_r($resultArray);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [number] => Array ( [number] => +918800499626 ) [carrier] => Array ( [carrier] => asdasd ) ) [1] => Array ( [number] => Array ( [number] => 342423 ) [carrier] => Array ( [carrier] => assssssss ) ) )