Good day, there is a multidimensional array of this form array(1) { [0]=> array(3) { [0]=> string(2) "EN" [1]=> string(2) "he" [2]=> string(2) "en" } }. How to parse a multidimensional array into elements? And generally is there a universal function that parses arrays of any nesting level? For simple arrays, use this code, but such an array (array(1) { [0]=> array(3) { [0]=> string(2) "EN" [1]=> string(2) "he" [2]=> string(2) "en" } }
), he does not handle: foreach ($answer as $key => $value) { for ($i=0; $i < count($value); $i++) { if($value[$i] == 'call'){ $output .= "Calls"; }elseif($value[$i] == 'sms'){ $output .= "SMS"; }elseif($value[$i] == 'whatsapp'){ $output .= "WhatsApp"; }elseif($value[$i] == 'viber'){ $output .= "Viber"; } } }