I am writing a blog and when I display code, I usually do so like this:
< pre > < code > Code Goes Here < / code > < / pre>
But it will not display the starting of php <?php or the end ?> and I really need it to. Any suggestions?
Thanks.
I am writing a blog and when I display code, I usually do so like this:
< pre > < code > Code Goes Here < / code > < / pre>
But it will not display the starting of php <?php or the end ?> and I really need it to. Any suggestions?
Thanks.
I am not sure how blogs work but you can try the php function "highlight_string();" like this:
<?php
highlight_string('<?php phpinfo(); ?>');
?>
It will output the ('input') as a string with colorcoding. check out its php documentation: http://php.net/manual/en/function.highlight-string.php