RE: [PHP-WIN] Line feeds and WRAP="soft" TEXTAREA element

From: Date: Fri, 31 May 2002 21:08:23 +0000
Subject: RE: [PHP-WIN] Line feeds and WRAP="soft" TEXTAREA element
Groups: php.windows 
Request: Send a blank email to php-windows+get-14041@lists.php.net to get a copy of this message
Or, as always, try a preg ;) $string = preg_replace("/\n/", "<BR>\n", $string); --- Scott Hurring Systems Programmer EAC Corporation ScottH@eac.com Voice: 201-462-2149 Fax: 201-288-1515 > -----Original Message----- > From: Nikolai Jeliazkov [mailto:null@bitex.com] > Sent: Friday, May 31, 2002 2:27 AM > To: r.fleming@clara.co.uk; php-windows@lists.php.net > Subject: Re: [PHP-WIN] Line feeds and WRAP="soft" TEXTAREA element > > > try nl2br > http://www.php.net/manual/en/function.nl2br.php > > Nikolai Jeliazkov > > > > Ross Fleming wrote: > > Thanks for that, if only because I didn't know PHP included > the "foreach" > > function, useful to know. :) > > > > Ross > > > > > >>-----Original Message----- > >>From: Michael Reynolds [mailto:wshs_chat@yahoo.com] > >>Sent: 31 May 2002 04:36 > >>To: php-windows@lists.php.net > >>Subject: Re: [PHP-WIN] Line feeds and WRAP="soft" TEXTAREA element > >> > >> > >> > >>--- Michael Reynolds <wshs_chat@yahoo.com> wrote: > >> > >>>--- Matt Babineau <matt@criticalcode.com> wrote: > >>> > >>>>Is there any way to detect linefeeds and replace them > with <BR> for > >>>>output in html? > >>>> > >>> > >>>$data=explode("\n",$data); > >>>foreach ($data as $line) { > >>>print($data."<br>\n"); > >> > >>(oops) replace that with: > >>print($line."<br>\n"); > >> > >> > >>>} > >>>$data=implode("\n",$data); > >>> > >> > >> > >>__________________________________________________ > >>Do You Yahoo!? > >>Yahoo! - Official partner of 2002 FIFA World Cup > >>http://fifaworldcup.yahoo.com > >> > >>-- > >>PHP Windows Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > > > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.windows (#14041) next »