Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  
 

When are you supposed to use endif to end the conditional statement?

Ads

 
 

Share on Google+Share on Google+

brijesh
When are you supposed to use endif to end the conditional statement?
1 Answer(s)      6 years and 9 months ago
Posted in : PHP

When are you supposed to use endif to end the conditional statement?

Ads
View Answers

November 15, 2010 at 11:33 AM


Hi all,

When the original if was followed by : and then the code block without braces.

Example:

<?php
if ($username == "deepak"):
    echo "User Name is deepak.";
elseif ($username == "kumar"):
    echo "User Name is kumar.";
else:
    echo "wrong user name";
endif;
?>

Thanks


Ads









Related Tutorials/Questions & Answers:
Advertisements