- 1
What's wrong with this code?
<?php function mult($num1, $num2) { $res = $num1 * $num2; $ted = $num1 + $num2; $josh = $num1 - $num2; $what = $num1 / $num2; $meg = array($res, $ted, $josh, $what); return $meg; } echo mult(8, 3); ?>
1 Answer
+ 4
you can't echo an array. use implode() to convert the array to a string.