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

0 points
Submitted by Devin Kit Crosland
over 9 years

Why the extra requirements?

Why do these exercises require the brackets in the if/elseif/else statements? PHP allows you to omit them when it doesn’t create ambiguity - why make the exercises have different syntax requirements than the actual language?

Answer 548a156d51b8871d03000060

1 vote

Permalink

Because it’s something for beginners to get used to programming in general

points
Submitted by Robinvb
over 9 years

Answer 548a162a9113cb7f7800006a

1 vote

Permalink

That’s a great reason to put them in the written part of the tutorial… but I still think it should pass with acceptable PHP code either way. It’s frustrating to have to go back and add in unnecessary details just to move on with the program.

points
Submitted by Devin Kit Crosland
over 9 years

1 comments

Robinvb over 9 years

Yeah true, it’s really harsh on it’s requirements

Answer 55c4487ed3292f9f96000260

0 votes

Permalink

Can someone provide here the code without these extra brackets please! I’d like to know how it will be with less code.

points
Submitted by Boris Atanasov
over 8 years