News

Navigation
In this tutorial I will give a brief lesson on the PHP if-then-else statement.
Keep in mind that I don't practice the proper 'formatting' of code (like indenting).
It doesn't matter, but it does make things easier for big projects.



This will check to see what $color is and return the proper results.
If $color is "red" then print "Red is a cool color!".
But, If $color is not "red", then print "That color isn't red!".

Now I'll go into a deeper version of the above example.



This will also check to see what $color is and return the proper results.
If $color is "red", then print "Red is a cool color!".
Or, If $color is not "green", then print "Green is also a cool color!".
And if $color isn't "red" or "green", then print "That color is $color.".

[Back To PHP Tutorials]
NewsPro Login



Hosted
Kurk78
PeopleAreShit.tk
Skateboard-X.tk
Zak Entertainment ZaksJournal.tk

Links
Citric Acid O
Casual Cruely
Xeons.net
KoRnDragon.com
LoserUser.tk
Fusion-X.net

FREE CONDOMS
IllNoiseInc.com
Moovitz.com

More Links

Topsites


Hornets Nezt Topsites

Designed By: Xak
© 1999 - 2003 Zak Entertainment, Inc.
All Rights Reserved.
Free Web Hosting