<?php $array = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,100]; $result = []; foreach($array as $num){ if(strlen($num) < 2){ $result[] = $num; }else{ $parts = str_split($num); $result = array_merge($result,$parts); } } print_r($result); ?>
You have javascript disabled. You will not be able to edit any code.