Friday, 19 April 2013

PHP If......Else


If & Else in PHP biasax used to distinguish a kondosi bisax in use in pemerograman.

If and Else statements.
've Ever come across in some local and non-local website there are certain fitur2 that can only be accessed by members who have registered, well to tell which is a member and which one is not a member of programmers usually use If and Else statements.

EXAMPLE:
If the variable $ age = 17, it will be printed "Simply Age" and if under 17, it will be printed "Under age".
how to implement it in PHP is:
<? php
$ age = '17 ';
if ($ age> = 17) {
echo 'Simply Age';
else {}
echo 'Underage';
}
?>

No comments:

Post a Comment