3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 'patient_id' => Array ( '0' => 23, '1' => 24, '2' => 25 ), 'fullname' => Array ( '0' => 'Jhon Sena', '1' => 'Mary Sena', '2' => 'Carter Sena' ), 'type' => Array ( '0' => 'pdf', '1' => 'pdf', '2' => 'pdf' ), 'textarea_text' => Array ( '0' => 'text', '1' => 'text2', '2' => 'text3' ) ); $fialArray = []; foreach($array as $key=>$value){ foreach($value as $k=>$val){ $fialArray[$k][$key] = $val; } } print_r($fialArray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [patient_id] => 23 [fullname] => Jhon Sena [type] => pdf [textarea_text] => text ) [1] => Array ( [patient_id] => 24 [fullname] => Mary Sena [type] => pdf [textarea_text] => text2 ) [2] => Array ( [patient_id] => 25 [fullname] => Carter Sena [type] => pdf [textarea_text] => text3 ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
31.04 ms | 407 KiB | 5 Q