Re: Newline in a guestbook

From: Date: Tue, 24 Apr 2001 21:59:12 +0000
Subject: Re: Newline in a guestbook
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50193@lists.php.net to get a copy of this message
Jimmy Bäckström <broder_b@chello.se> wrote: > I thought about reading the whole message into an array, and then loop through it and for each > word check whether it is larger than x chars, and if so, change it. But couldn't that be a very > memory consuming script if it should do that for every message? Anyone knows how I could do this? Dont! look at the wordwrap function, in short in works like this: echo wordwrap ($body, $length, "<br>"); read more here: http://www.php.net/manual/en/function.wordwrap.php -- Henrik Hansen

« previous php.general (#50193) next »