mallen Posted February 3, 2012 Share Posted February 3, 2012 How can I post PHP code on my website and style like this? http://www.9lessons.info/2010/02/php-login-script-with-encryption.html http://www.free-php.net/830/wordpress-custom-field-image-to-featured-image/ Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/ Share on other sites More sharing options...
digibucc Posted February 3, 2012 Share Posted February 3, 2012 just style it with css as you would normally. you can add styles to H tags, span tags, etc. so for example: echo '<h4 style="color:red;"> text here </h4>'; or echo '<h4 style="color:red;">'. $variable. '</h4>'; Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/#findComment-1314205 Share on other sites More sharing options...
mallen Posted February 3, 2012 Author Share Posted February 3, 2012 Well yeah I could but I know for example there is a plug in for WordPress that allows you to do make it look like this http://www.free-php.net/830/wordpress-custom-field-image-to-featured-image/ but I am not using WordPress. I know this board uses Code tags. This is what they are using http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/php.html Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/#findComment-1314213 Share on other sites More sharing options...
digibucc Posted February 3, 2012 Share Posted February 3, 2012 http://www.webresourcesdepot.com/11-syntax-highlighters-to-beautify-code-presentation/ https://www.google.com/search?aq=f&q=php+syntax+highlighter+script do you not mean for code? Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/#findComment-1314248 Share on other sites More sharing options...
Andy-H Posted February 4, 2012 Share Posted February 4, 2012 highlight_string Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/#findComment-1314258 Share on other sites More sharing options...
digibucc Posted February 4, 2012 Share Posted February 4, 2012 very cool andy, thank you. i did not know of that Quote Link to comment https://forums.phpfreaks.com/topic/256345-how-to-print-color-formatted-php-code/#findComment-1314399 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.