note 30115 added to function.nl2br

From: Date: Thu, 06 Mar 2003 21:24:52 +0000
Subject: note 30115 added to function.nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-44952@lists.php.net to get a copy of this message
I'm looking to display data from a textarea field exactly how it was entered, including spaces (simulating a pressed TAB key). For example, if people were logging hours on a project for Time & Material, I have people entering: Name Hours Joe 6 Sue 7 It is displayed in html as: Name Hours Joe 6 Sue 7 How do I capture the spacing? It always seems to get truncated or pressed together when displayed in html. However, if I edit it back in a textarea, it is fine. The nl2br() function works beautifully, it's just the losing of additional spaces between words that doesn't work for me. -- http://www.php.net/manual/en/function.nl2br.php http://master.php.net/manage/user-notes.php?action=edit+30115 http://master.php.net/manage/user-notes.php?action=delete+30115 http://master.php.net/manage/user-notes.php?action=reject+30115

« previous php.notes (#44952) next »