Php Echo Other Php Code
Im trying to have php code that contains an echo. within that echo however, I need it to echo php code within it. a short example is bellow.
Solution 1:
In a html context, <?php
, <something
, etc, is the opening of a html tag. Edit <
with his html entity <
to prevent it happening..
<?php
Even better, use htmlspecialchars:
<?phpecho htmlspecialchars('<?php echo "test"; ?>'); ?>
Post a Comment for "Php Echo Other Php Code"