output php variable in html code example
Example 1: set php var to html
<?php ob_start();?>
<div>Contents goes <b>here</b></div>
<?php $contents=ob_get_clean();?>
Example 2: php echo html and variable
echo '<img src="' . $Variable . '">';
<?php ob_start();?>
<div>Contents goes <b>here</b></div>
<?php $contents=ob_get_clean();?>
echo '<img src="' . $Variable . '">';