how to print php in html code example Example 1: print in php print_r(""); Example 2: echo php <?php $string = "Hello, World!"; echo $string; ?>