![]() |
Need little help in Coding
I have been starting
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 |
| All times are GMT -4. The time now is 11:27 AM. |
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.