+ 1

whats wrong with my syntax ?

html> <head> </head> <body> <p> <?php // Write your if/elseif/else statement here! $age = 21; if($age== 21) { echo"the condition is true"; } else if($age!=21) { echo "the condition is false!"; } else { echo "thecondition is false!"; } ?> </p> </body> </html>

14th Jul 2017, 7:24 AM
Patrick Estaron Magayon
Patrick Estaron Magayon - avatar
2 odpowiedzi
+ 13
You should close the <html> tag but your syntax is correct and it works fine. Be sure to run it in the PHP Code Playground. :)
14th Jul 2017, 7:30 AM
Maz
Maz - avatar
+ 2
Nothing just html tag don't have <
14th Jul 2017, 7:30 AM
RexProg
RexProg - avatar