This forum is now read-only. Please use our new forums! Go to forums
Semicolon?
So it said to “Go ahead and write a comparison that is true.”, so I wrote 8 > 2 between the php tag. So the final code was:
<?php
8 > 2;
?>
But it didn’t work. It only worked when I removed the semi-colon. Is that ok?
Answer 53a42aab9c4e9d05e0002ac4
Hi, if you put the comparison on the same line as the ‘<?php>’ it should work… it did for me anyhow…
Answer 52324d20f10c60dec0000bb8
I’m having the same problem.
Moving along by removing the semicolon though.
Answer 53c3fd288c1ccc7852001601
The issue here isn’t the semi-colon. For some reason, if you have a single line with a > in it, the code is seen as invalid. Most likely this is due to some regular expression usage incorrectly thinking the > sign denotes the end of the PHP tag. If you convert this to !=, it shall work. Or do as Adam above me said, and use two > tags.
1 comments
I’ve submitted a proper bug report about this. Hopefully it’s taken care of.
Answer 5228b190f10c607e54004566
I think the semi-colon denotes the end of a code without it, it probably expect more codes that’s how I understand is
6 comments
But, at this point, it didn’t ask us to make an if statement. It asks to write a comparison that is true. I know how to make an if statement, but I was trying to do the task given.
Same problem here. It won’t work with a semicolon.
I can’t get mine to work with or without the semicolon.
I just got mine to work, actually. I had to refresh the page.
I have done it with/without a semi-colon and refreshing the page. It just won’t work. I think exercise 3 did something similar. The whole PHP lesson has been buggy as crap.
Answer 5308aaf97c82caf20a000a30
Me too, not a good start to the course - obviously an error.
Answer 530a33ae9c4e9d8e78002c81
So basically there has been no answer or fix for this problem? I had the same problem.
Answer 542bcefd631fe928400016bb
Answer 53bd951380ff332e4f00016a
I just compared two pairs and it’s worked.
2>1; 1>0;
Answer 55816a899113cb4760000540
I don’t think that there is a bug.
You should ensure the operation is true.
(e.g.5 < 2;
would return False).
I think the error messaging should be amended to be clearer.
Answer 55ad564a9113cb05e90005a2
there’s a mistake in the example, make sure you include the ‘echo’ command, otherwise it won’t understand what you want to do. That said, my code is correct and double checked by a tech guy i know but still won’t work. I think there is a bug in the site /: good luck. apparently it is fine in firefox if you have it :)
Answer 530b7bcd282ae3d7800030e0
1 comments
That was very helpful.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
Hmmm interesting. I shall try. Sounds a little broken though.
Thx Bro!