php echo other php code

后端 未结 2 1625
刺人心
刺人心 2021-01-28 16:26

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.



        
2条回答
  •  -上瘾入骨i
    2021-01-28 17:02

    In a html context, , , etc, is the opening of a html tag. Edit < with his html entity < to prevent it happening..

    <?php
    

    Even better, use htmlspecialchars:

    '); ?>
    

提交回复
热议问题