+ 24
Why is this code not working properly?
20 Answers
+ 8
line no 2, 3: add $ to "num6"
+ 3
STOP DOWNVOTE EVERYONE'S ANSWER!!!!
+ 2
add da dollar sign to both "num6"s. u can see it in the console...
+ 2
you forget to place $ in "num6"
+ 2
Insert '#x27; sign to 'num6' in line 2 & 3.
+ 2
?php
function mult($num1, $num2 ,$num6) {
$res = $num1 * $num2 + $num6 ;
return $res;
}
echo mult(8, 3, 6);
?>
Code should work fine now
+ 2
num6 is not declared, need $num6
+ 2
php looks a lot like perl to me. leaving off the "quot; in front symbol is the problem. In perl "quot; is used to access the scalar value of the symbol.
+ 1
https://code.sololearn.com/wTzaNleiDt32/?ref=app
This works and you can see what's wrong there.
+ 1
$ in num6
+ 1
in php you need to add $ in the front of the variable in line 2 and line 3.
+ 1
This code should work fine now
https://code.sololearn.com/wwuAu2kofRpz/?ref=app
0
you need to add $ to num6
0
you need to add $ sign before num6
0
you missed the dollar sigh on num6
0
There isn't a $ sign before num6
0
to declare variables in php, you should use $ sign in front of the name of variables. ex: $num1 $data_variable $result etc...
0
guys i cant link php to html document pls help...
0
you wrote num6 instead of $num6