Home
Credits
Affliates
Link Exchange

HTMLshaman
PHPshaman
LINUXshaman

Helpful Links
Web Design Images
Backgrounds
Icon Sets
GIF Images


Language Intro : Script Flow ( IF, ELSE, WHILE )

Not everytime would it be necessart for you to excute the whole script, there would be time for you to need it to do something if and only if the variables are matching or mismatching.

This can be achieved with an IF, ELSE IF and ELSE
Below is a basic structure :
if ( $number = "10" )
{
print "I got almost a dozen marshmellows!";
}
elseif ( $number > "10")
{
print "WOOOHOOO!!!";
}
else
{
print "I am hungry";
}

From the above, we can see that if the user has entered a 10 he would have gootten a result of "I got almost a dozen marshmellows!" and if he enters anything more than 10 he would get the value "WOOOHOOO!!!", but if the value is anthing that is not within the values specified, ( eg. 9 ), it will return a value "I am hungry"


There may be also times where you would like to loop the expression over and over again until something else happens, and this can be done with the WHILE statement
For example :
while ( $number => 100 )
{
print "I have too many!!";
}
This allows the expression to continue to print "I have too many!!" until the $number has less than 100.






Basics
Introduction
Compilation for Apache

Language Intro
The Basics
Structuring
Script Flow
Functions
Arrays
Objects

Extras
Global values

Simple Scripts
MySQL Query
File Upload
List Contents






Disclaimer:
Contents on this site is provided for educational purposes and will not be distributing source codes from any major commercial reference.
Partial code may be used to provide better understanding of how the program works or functions to illustrate to the reader more clearly.
Other programs that are provided freely on the internet may be placed as a quick solution to the user's needs taking in consideration that it is not altered in any way.

Our Recommended Links
prepaid phone card
Online Casino
Smiley Central
Ventrilo Servers
Counter-Strike Servers
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
phone card

Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Hollywood Lyrics
Resident Evil
Contact us at webmaster@galacnet.com for advertising opportunities on GalacNet.