rahish Posted April 25, 2007 Share Posted April 25, 2007 Hi What is the best way to be able to view php code in html pages. I use a VLE and want to produce color coded php for my students within an html page. I notice that your tutorials show this. Where do I start? Quote Link to comment https://forums.phpfreaks.com/topic/48625-display-php-code-in-html-pages-for-writing-tutorials/ Share on other sites More sharing options...
taith Posted April 25, 2007 Share Posted April 25, 2007 html pages "cannot" process php... but you can have html tags, within php files... for example... <? $test='test'; ?> <span><?=$test?></span> Quote Link to comment https://forums.phpfreaks.com/topic/48625-display-php-code-in-html-pages-for-writing-tutorials/#findComment-238093 Share on other sites More sharing options...
redbullmarky Posted April 25, 2007 Share Posted April 25, 2007 here's a good start: http://uk.php.net/highlight_string Quote Link to comment https://forums.phpfreaks.com/topic/48625-display-php-code-in-html-pages-for-writing-tutorials/#findComment-238095 Share on other sites More sharing options...
rahish Posted April 25, 2007 Author Share Posted April 25, 2007 Thanks for your reply What I mean is on the php freaks tutorials for example, <a href="http://www.phpfreaks.com/tutorials/123/1.php">http://www.phpfreaks.com/tutorials/123/1.php</a> There is colour coded php in boxes. Its fine if I can only do it on PHP pages but I am not sure where to start. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/48625-display-php-code-in-html-pages-for-writing-tutorials/#findComment-238119 Share on other sites More sharing options...
rahish Posted April 25, 2007 Author Share Posted April 25, 2007 here's a good start: http://uk.php.net/highlight_string Thanks that's the kind of thing I need I think. I'll come back if I get stuck again. Rahish Quote Link to comment https://forums.phpfreaks.com/topic/48625-display-php-code-in-html-pages-for-writing-tutorials/#findComment-238128 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.