doa24uk Posted October 8, 2009 Share Posted October 8, 2009 Hi guys, I've been wondering.... Is it possible to take the $code variable (used to store the text between the [code*] tags) and explode it by \n (newline) characters for example First Line Second Line Third Line <?php $codelines = explode("\n", $code); // or \r\n if it uses this instead echo "First line = $codelines[0]<br>"; echo "Second line = $codelines[1]<br>"; echo "Third line = $codelines[2]<br>"; ?> If so, where would I put it to be useful on the showthread page?? Quote Link to comment https://forums.phpfreaks.com/topic/177028-vbulletin-question-code-tags-explode-code-by-n/ Share on other sites More sharing options...
Gayner Posted October 12, 2009 Share Posted October 12, 2009 We don't have vbulletin here Quote Link to comment https://forums.phpfreaks.com/topic/177028-vbulletin-question-code-tags-explode-code-by-n/#findComment-935543 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.