Christian F. Posted September 25, 2012 Share Posted September 25, 2012 It is valid, as the last statement is closed by the closing PHP tag. Though, that said I wouldn't recommend it either. Quote Link to comment Share on other sites More sharing options...
Hall of Famer Posted September 25, 2012 Share Posted September 25, 2012 (edited) Well if all your script does is to output one line of sentence to your users such as echo "hello world", or echo "Welcome to our site", then why not just use plain html? XD Edited September 25, 2012 by Hall of Famer Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 25, 2012 Author Share Posted September 25, 2012 BTW this code is valid (note no semicolon) <?php echo 'Hello world' ?> I mentioned that in an earlier post... Quote Link to comment Share on other sites More sharing options...
Barand Posted September 25, 2012 Share Posted September 25, 2012 I mentioned that in an earlier post... And yet you still put this in your test questions post 10. All statements must end with a semi-colon? * True - False Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 25, 2012 Author Share Posted September 25, 2012 (edited) And yet you still put this in your test questions post Because I was told that I should, even after mentioning that. Edited September 25, 2012 by The Little Guy Quote Link to comment Share on other sites More sharing options...
Barand Posted September 25, 2012 Share Posted September 25, 2012 I'd go along with "All statements should end with a semi-colon" Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 25, 2012 Author Share Posted September 25, 2012 Like and Done! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.