tallberg Posted June 30, 2009 Share Posted June 30, 2009 Hi Im using php to out put alot of javascript into the head section of my doc. It all goes in one long line which makes it difficult to debug and just quite messy. Is there a charecter i can use to make new lines? Quote Link to comment https://forums.phpfreaks.com/topic/164260-out-put-javascript/ Share on other sites More sharing options...
Alex Posted June 30, 2009 Share Posted June 30, 2009 nl2br() Maybe. Quote Link to comment https://forums.phpfreaks.com/topic/164260-out-put-javascript/#findComment-866476 Share on other sites More sharing options...
premiso Posted June 30, 2009 Share Posted June 30, 2009 $newline = "\n"; echo "This should be split up when source is viewed {$newline} ok!"; I also think that PHP has a built in constant as PHP_EOL Quote Link to comment https://forums.phpfreaks.com/topic/164260-out-put-javascript/#findComment-866481 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.