Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

if else in php html

<? if ($condition): ?>
  <p>Content</p>
<? elseif ($other_condition): ?>
  <p>Other Content</p>
<? else: ?>
  <p>Default Content</p>
<? endif; ?>
 
PREVIOUS NEXT
Tagged: #php #html
ADD COMMENT
Topic
Name
6+4 =