user1616704 user1616704 - 4 months ago 7x
PHP Question

Echo a String In PHP that contains <? ?> or <?php ?> and a PHP function

How can I echo a string that contain

For example,

$txt="<? echo get_block('$guid');?>";

The above result outputs nothing.

$txt="<? echo get_block('$guid');?>";
echo highlight_string($txt, true);

Highlight String will result in the following output .

<?php echo get_block('1'); ?>