Welcome Guest! | Sign Up? | Login |
Total Members: 29
Members Online: 0
Guests Online: 1
Total Online: 1
Total Articles: 4
Total Tutorials: 4
XHTML/HTML Tutorials: 2
CSS Tutorials: 1
PHP Tutorials: 1
Javascript Tutorials: 0
External Tutorials: 0
Total Posts: 2
Total Threads: 2
find us on facebook

Conditional Statements in PHP

Example Code by forumadmin

<?php
//The code below shows the basic usage of conditional statements in PHP
 
$fruit="banana";
 
if ($fruit=="banana") {
    echo("I am yellow");
} else if ($fruit=="orange") {
    echo("I am orange");
} else {
    echo("No fruit set!");
}
?>
Google
member avatar Breapceve
member since
11th Oct 2008
view profile
Valid XHTML 1.0 Valid CSS