IF Statement In PHP

[php]

<html>

<head>
<title>IF statements in PHP.</title>
</head>
<body>

<?php

$name = "Rose";

if ( $name == "Rose" )

echo "Your name is Rose!<br />";

else

echo "Welcome to my homepage!";
?>
</body>
</html>

[/php]

Output:

If the Given input is Rose,the output will be

Your name is Rose!

Else

Welcome to my homepage!

1 Comment to IF Statement In PHP

cna training
August 23, 2010

Wow this is a great resource.. Iā€™m enjoying it.. good article

Leave a comment

Request a Free SEO Quote