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