pass echo output to variable php code example Example: echo php <?php $string = "Hello, World!"; echo $string; ?>