Установите php var на HTML
<?php ob_start();?>
<div>Contents goes <b>here</b></div>
<?php $contents=ob_get_clean();?>
RedGuy12
<?php ob_start();?>
<div>Contents goes <b>here</b></div>
<?php $contents=ob_get_clean();?>
$varName = "Hello, World";