I have been trying to display contents between a <li>
tag when my particular condition is satisfied. Initially I am having a $result string in which I am trying to check for a condition. But I suppose I am doing wrong with syntax.
My code:
$Result1 =
'<div id="midrow">
<ul class="rounded-list">
<li ><strong>Name:</strong> '.$username.'</li>
htmlspecialchars('<? if($tips_flag == 1){ ?>');
<li >Competency 6 - Offer concessions: '.round($per_s6, 2).' percent</li>
htmlspecialchars('<? } ?>)';
</ul>
</div>';
My these three lines are incorrect I suppose,
echo htmlspecialchars('<? if($tips_flag == 1){');
<li >Competency 6 - Offer concessions: '.round($per_s6, 2).' percent</li>
echo htmlspecialchars('<? } ?>)';
Help Plz!