jiveturkey420 Posted August 11, 2012 Share Posted August 11, 2012 Hey y'all, I can't seem to figure out how to put snippits of PHP in a post with the fomatting. You know, like gedit or some other program does, with the different colors for different kinds of code or whatnot? Could anyone help me out with how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/266951-php-formatting/ Share on other sites More sharing options...
Christian F. Posted August 11, 2012 Share Posted August 11, 2012 Use the [php][/php] tags around the code. Quote Link to comment https://forums.phpfreaks.com/topic/266951-php-formatting/#findComment-1368626 Share on other sites More sharing options...
Mahngiel Posted August 11, 2012 Share Posted August 11, 2012 Use the [php][/php] tags around the code. actually, the .. tags are known to give hidden newline characters. This is why i use <?php Quote Link to comment https://forums.phpfreaks.com/topic/266951-php-formatting/#findComment-1368634 Share on other sites More sharing options...
PFMaBiSmAd Posted August 11, 2012 Share Posted August 11, 2012 Actually2, please use the bbcode tags around code (the # button.) The tags, depending on the original new-line character in the source, adds a new-line character to every \t, \r, and \n in the code, resulting in hundreds of extra new-lines when you select/copy/paste code to try and help with it. Quote Link to comment https://forums.phpfreaks.com/topic/266951-php-formatting/#findComment-1368635 Share on other sites More sharing options...
Christian F. Posted August 11, 2012 Share Posted August 11, 2012 Hmm... Never noticed that, but I'll keep it in mind. Thanks for letting us know about that bug. Quote Link to comment https://forums.phpfreaks.com/topic/266951-php-formatting/#findComment-1368637 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.