Hey, I have a website, http://www.webmastergalaxy.net its about sharing webmaster experience and advice and obviously, part of the thing I'm sharing are PHP and java scripts. However, in the case of PHP (not sure of the Javascripts I have a big problem) My PHP uploader script, allows the user to add a script onto my website. The user puts in the script and the "<" is turned into a "<" so that it can be read by the end user, however there is a problem. lets say the user puts in the script <?php header("location:http://www.eselfhypnosis.com/self-help"); exit; ?> PHP: it then becomes <?phpheader("location:http://www.eselfhypnosis.com/self-help");exit;?> PHP: rendering it useless to the end user. This means I have to edit the script manually, which is a right pain in the arse, anyone have any idea of how I can overcome this? thanks a lot.
There is a function in PHP to take care of line breaks, nl2br() $text=nl2br($text); Then you print $text , you will have all line breaks.