public function pom() {
$array = [25, 12, 5, 82, 15];
$result = 0;
for($i = 0; $i < count($array); $i++) {
$first = str_split($array[$i]);
if(is_numeric($first[0]))
$result += $first[0];
}
return $result;
}
it works like this but question says i cannot use strings . Does it mean i cannot use str_split ?