Posted by Oli Filth on 10/12/05 17:26
Zilla wrote:
> Robizzle wrote:
> [snip]
> > "this is a test. There is a new
> > line between the words 'new' and 'line'"
> >
> > I end up with a news post that looks like "this is a test. There is a
> > newline between the words 'new' and 'line'".
> [snip]
>
> My guess is that you don't convert newlines to <br>'s when you show the
> posts. Html doesn't show a new line if there is just a newline. It needs
> a <br> tag.
>
> Take a look at this:
>
> www.php.net/nl2br
>
> Hope it helps.
>
If you want to be HTML 4.01 compliant, use:
str_replace("\n", "<BR>", $str);
instead.
--
Oli
Navigation:
[Reply to this message]
|