Quantcast
Channel: 9zap.com » PHP
Viewing all articles
Browse latest Browse all 15

PHP if statement

$
0
0

php
IF statement is a conditional statement in PHP. We use IF statement to execute a set of codes when given condition is true.

IF statement Syntax

if (condition)
{
// Execute these code if condition is true
}

Example one:

<?php
 $name = "Ravi";
 if ($name == 'Ravi')
     {
 	echo "Hello $name";
     }
 ?>

Viewing all articles
Browse latest Browse all 15

Trending Articles