<?php
function sumdigits($numbers) {
$length = strlen($numbers);
$sum = 0;
for($i = 0; $i < $length; $i++) {
$number = substr($numbers, $i, 1);
$sum += $number;
}
return $sum;
}
?>
<?php
function sumdigits($numbers) {
$sum = 0;
for($i = 0; $i < $length; $i++) {
$number = substr($numbers, $i, 1);
$sum += $number;
}
return $sum;
}
?>