Callister Posted June 17, 2008 Share Posted June 17, 2008 Good afternoon, I have searched on the internet and the forums but have not really gotten a good answer to my problem. I wish to display some PHP code on my website, but the site will obviously render the code if I include it. I am aware that I can use markup codes like <, but converting a whole block of code to that seems tedious and time-consuming. Are these 'code helping' sites with similar code blocks seriously converting all of the code to markup? Are there strategies or a tag that I am overlooking to do this? Regards, Callister Quote Link to comment https://forums.phpfreaks.com/topic/110642-solved-displaying-code/ Share on other sites More sharing options...
Barand Posted June 17, 2008 Share Posted June 17, 2008 <?php highlight_file ('myscript.php'); also highlight_string(); Quote Link to comment https://forums.phpfreaks.com/topic/110642-solved-displaying-code/#findComment-567622 Share on other sites More sharing options...
Callister Posted June 17, 2008 Author Share Posted June 17, 2008 <?php highlight_file ('myscript.php'); also highlight_string(); Thank you. I must have overlooked the highlight_file function. I did see the string function, but I knew it wasn't any easier to use that for a whole script. Quote Link to comment https://forums.phpfreaks.com/topic/110642-solved-displaying-code/#findComment-567625 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.