Michael3823
a function that returns the sum of 2 of the biggest numbers in the array.
function sumOfTwo(array $array ){
$firstValue;
$secondValue;
foreach ($array as $i) {
if($i > $value){
$secondValue = $firstValue;
$firstValue = $i;
}
else if($i > $secondValue and
$i != $firstValue){
$secondValue = $i;
}
}
return($firstValue + $secondValue);
}
Error: spawn php ENOENT