I am wondering is it possible to print php syntax on html page.For example below is the php syntax i want to echo on html page via php.
Please <?php echo $random[array_rand($random)]; ?> the [url=http://feeds.feedburner.com]hello[/url].<br>
Also [url=http://feeds.feedburner.com]<?php echo $random[array_rand($random)]; ?>[/url].
<br>
Try this:
<?php
$str='Please <?php echo $random[array_rand($random)]; ?> the [url=http://feeds.feedburner.com]hello[/url].<br>
Also [url=http://feeds.feedburner.com]<?php echo $random[array_rand($random)]; ?>[/url].
<br>';
echo highlight_string($str);
?>
Output:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With