Themans

Can I Insert HTML Within an "if" Statement?

Asked by Themans 2 years ago html php statement


Csgs
1

Most Helpful

Most Helpful

 
Yes it is possible. However, only if the $condition is true. In example:

<?php if($condition) : ?>
    <a href="http://designreviver[dot]com">This can only be displayed if $condition is succesful</a>
<?php endif; ?>

by Csgs 2 years ago

unregistered
0
 
Yes
Definitely you can insert HTML into a PHP if conditional statement.Example<?php//Condition starts hereif(condition){?><!--Your HTML Script --><?php} //End of condition?>

by unregistered 1 year ago

Rommel Castro A
1
 
Of curse!!!

by Rommel Castro A 2 years ago

Answer this question

Can I Insert HTML Within an "if" Statement?

0 errors found:

 
0