|
#1
|
|||
|
|||
|
What wrong with this? ive been staring at it but not coming up with anything im getting syntax error, unexpected T_RETURN where it says " return $result; " <?php function add_subtract ($value1, $value2) { $add = $value1 + $value2; $subtract = $value1 - $value2; $result = array($add, $subtract) return $result; } $resultArray = add_subtract (10,5); echo "Add: ".$resultArray[0]; echo "Subract: " .$resultArray[1]; ?> Thanks in advance |
![]() |
|
|