+ 24

Why is this code not working properly?

https://code.sololearn.com/wDC1qJ76tzjo/?ref=app

16th Jun 2018, 8:26 AM
Vučko/Вучко/Vuchko
Vučko/Вучко/Vuchko - avatar
20 Answers
+ 8
line no 2, 3: add $ to "num6"
16th Jun 2018, 8:34 AM
‎ ‏‏‎Anonymous Guy
+ 3
STOP DOWNVOTE EVERYONE'S ANSWER!!!!
18th Jun 2018, 11:54 AM
Jingga Sona
Jingga Sona - avatar
+ 2
add da dollar sign to both "num6"s. u can see it in the console...
17th Jun 2018, 11:03 AM
DengSXCreates
DengSXCreates - avatar
+ 2
you forget to place $ in "num6"
17th Jun 2018, 11:57 AM
Jingga Sona
Jingga Sona - avatar
+ 2
Insert '
#x27; sign to 'num6' in line 2 & 3.
17th Jun 2018, 12:46 PM
Sujal Kumar
Sujal Kumar - avatar
+ 2
?php function mult($num1, $num2 ,$num6) { $res = $num1 * $num2 + $num6 ; return $res; } echo mult(8, 3, 6); ?> Code should work fine now
17th Jun 2018, 2:29 PM
Femi
Femi - avatar
+ 2
num6 is not declared, need $num6
17th Jun 2018, 6:23 PM
Ignacio Tejera
+ 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.
18th Jun 2018, 11:50 PM
Rick Shiffman
Rick Shiffman - avatar
+ 1
https://code.sololearn.com/wTzaNleiDt32/?ref=app This works and you can see what's wrong there.
17th Jun 2018, 1:14 PM
Aditya Vats
Aditya Vats - avatar
+ 1
$ in num6
17th Jun 2018, 1:19 PM
MOHAMED SAEED
MOHAMED SAEED - avatar
+ 1
in php you need to add $ in the front of the variable in line 2 and line 3.
17th Jun 2018, 8:44 PM
Tirth Doshi
+ 1
18th Jun 2018, 3:36 AM
S@l
0
you need to add $ to num6
17th Jun 2018, 10:53 AM
Aviad Pinsberg
Aviad Pinsberg - avatar
0
you need to add $ sign before num6
17th Jun 2018, 11:00 AM
Anayut Ullah
Anayut Ullah - avatar
0
you missed the dollar sigh on num6
17th Jun 2018, 9:05 PM
Frank
Frank - avatar
0
There isn't a $ sign before num6
18th Jun 2018, 3:33 AM
S@l
0
to declare variables in php, you should use $ sign in front of the name of variables. ex: $num1 $data_variable $result etc...
18th Jun 2018, 11:48 AM
Ali Bayat
Ali Bayat - avatar
0
guys i cant link php to html document pls help...
19th Jun 2018, 9:45 PM
Simeon
Simeon - avatar
0
you wrote num6 instead of $num6
22nd Jun 2018, 8:58 AM
E4GL
E4GL - avatar