This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by chipJumper65700
almost 11 years

I can't get any comparison to work in this exercise?

Title says it all. For some reason it just says everything I’ve done is not a valid comparison. E.g. my code is

Answer 517148682942bae620002e85

27 votes

Permalink

I had to remove the semicolon ;

points
Submitted by Thomas Johanns
almost 11 years

12 comments

Sam LeCreateur almost 11 years

that is weird…. wtf

Sam LeCreateur almost 11 years

I’m not the best in PHP but just by looking your comment I can tell that their is a problem in the website verification code… that is so weird…

chipJumper65700 almost 11 years

Ah thanks that worked for me too. Weird.

Thomas Johanns almost 11 years

For me, this comparison is not a statemrnt and thus the whole thing makes no sense. The comparison, if true, returns 1. But what shuld PHP do with this one?

Sam LeCreateur almost 11 years

PHP should be what it is suppose to do but the website is bug for some PHP exercices, and the exercice ask you to do a comparason…(Ex: 2>7, 4<=5, etc.)

Pete C. almost 11 years

Agree the Thomas Johanns, it makes no sense to put it that way. Shouldn’t it tell the student to omit the semicolon, or assigning it to a variable?

Sam LeCreateur almost 11 years

THIS IS A BUG!!! guys, you got it?? your are suppose to put the semi-colon, but it does not work.. OK??

Pete C. almost 11 years

Yes, but shouldn’t they fix that?

Sam LeCreateur almost 11 years

Yes, they should but they don’t… for some reason. But if you don’t put a semi-colon in a real program in PHP, it would not work.

Matt Jamison almost 11 years

!

deadpool2468 over 10 years

Thank you so much i have been stuck on it for almost an hour your a life saver i was about to smash the computer.

Solu Scarlet about 10 years

oh!!!!my god!!!!!!!

Answer 51713e8e14f6011b9d002aa0

6 votes

Permalink

Squashing the

points
Submitted by Patrick Rollings
almost 11 years

2 comments

chipJumper65700 almost 11 years

For some reason I had to do this as well. Something’s strange about this exercise.

Bob Brooke almost 11 years

hmm whitespaces unimportant..

Answer 51afb8449c4e9d34c30003ee

2 votes

Permalink

Removing the semi-colon worked for me as well.

points
Submitted by Scott Tabako Jr
almost 11 years

Answer 51720b85223391c3020009cb

0 votes

Permalink

removed semi colon worked

points
Submitted by hiansc
almost 11 years

Answer 51754e1dd18185a622000bec

0 votes

Permalink

points
Submitted by jane
almost 11 years

Answer 5171309d52a70285b0002741

-1 votes

Permalink

Don’t put the “=” but “6 < 7”

points
Submitted by Sam LeCreateur
almost 11 years

Answer 517660c1cc010b99d8001ebf

-1 votes

Permalink

removed semi colon worked for me as well, funny…

points
Submitted by wuotan
almost 11 years