Results 1 to 2 of 2
Thread: BBcode and the \n function
Aug 3, 2006, 20:09 #1
BBcode and the \n function
I am making some BBcode for my CMS and I've run into an interesting issue.
[*list] [li]item 1[/li] [li]item 2[/li] [/*list]
All fine and dandy. The problem is I use the PHP code nl2br to convert \n into <br> so that when users are typing in content we may allow them to keep paragraphs. So the problem becomes clear now.
When outputting the list code, I get this code:
<ul><br /> <li>item 1</li><br /> <li>item 2</li><br /> </ul>
Aug 4, 2006, 21:51 #2