Nl2br , modify for always normal paragraph display

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
uyewq
Forum Newbie
Posts: 22
Joined: Thu Sep 17, 2009 6:21 am

Nl2br , modify for always normal paragraph display

Post by uyewq »

while using nl2br, if user submit ENTER button (while writing comment) 3 or more times lots of gaps appears between paragraphs

is it possible to modify these gaps?

if user submit ENTER once => create one more empty line and make second paragraph

if user submit ENTER twice => ok, it is as it should be.(so do nothing)

if user submit ENTER three times or MORE => crop ( n - 2) times empty lines so make a normal paragraph

if this is possible, how ?
Post Reply