RE: [PHP] inserting spaces/returns in form postings

From: Date: Sun, 24 Dec 2000 00:27:26 +0000
Subject: RE: [PHP] inserting spaces/returns in form postings
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-31721@lists.php.net to get a copy of this message
"Matthew Kendall" ... > "Police Trainee" wrote... > > is there anyway to translate or write extra spaces and > > carriage returns in a file so that it is reflected on > > a browser without making the user enter a <br> or > > &nbsp; each time they want a return or an extra space? > > Turn the spaces and carriage returns into &nbsp; and <br> using search and > replace functions, or using functions provided for this purpose like nl2br: > http://www.php.net/manual/function.nl2br.php You should try out also htmlentities() and htmlspecialchars().

« previous php.general (#31721) next »