<?php $myArr=array( array( 'question' => 'First Question', 'opt' => array('A','B','c','D'), 'ans' => '3' ), array( 'question' => 'Second Question', 'opt' => array('A','B','c','D'), 'ans' => '1' ) ); function display_array($arr){ if(gettype($arr) == 'array'){ foreach($arr as $v){ display_array($v); } }else{ echo $arr . PHP_EOL; // change to BR (I used PHP_EOL just for 3v4l.org) } } display_array($myArr);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`