Home > Blockchain >  Can you echo php within php file
Can you echo php within php file

Time:11-01

How can i print <?php to text within a php file ?

I have tried this

<xmp>
<?php
</xmp>

and this

echo '<?php';

all i want to show in the html is <?php , i dont not want it closed anywhere

So the div on on the php page show <?php

CodePudding user response:

Yes you can. Try to use function htmlspecialchars

echo htmlspecialchars("<?php");
  •  Tags:  
  • php
  • Related