Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

: in PHP

/*
This is an easy way to execute conditional html / 
javascript / css / other language code with 
php if else:

No need for curly braces {}
*/
<?php if (condition): ?>

// html / javascript / css / other language code to run if condition is true

<?php else: ?>

// html / javascript / css / other language code to run if condition is false

<?php endif ?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #PHP
ADD COMMENT
Topic
Name
2+6 =