+ 1

IF and ELSE in php

What is the output?: <?php $num = 59; if ( $num > 50 ) { echo"Greater than 50"; } else { echo"Error;"; } ?>

28th Nov 2017, 7:49 PM
Master000
2 Respuestas
+ 3
At the moment? It shouldn't output anything because you didn't put a semi-colon at the end of "$num = 59" so you should get the PHP white screen of death. Otherwise, if you put a semi-colon at the end of line 2, you'll get "Greater than 50."
28th Nov 2017, 8:00 PM
AgentSmith
+ 2
Thank you Netkos Ent. And you answer is correct.
28th Nov 2017, 8:25 PM
Master000