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