Re: wordwrap()

From: Date: Tue, 17 Jul 2001 15:41:45 +0000
Subject: Re: wordwrap()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58285@lists.php.net to get a copy of this message
tyler@captainjack.com (Tyler Longren) wrote: > Maybe I'm not using it right, but I'm using the sample in the manual. > Here's the code: > <? > $text = "A very long woooooooooooord."; > $newtext = wordwrap( $text, 8, "\n", 1); > echo "$newtext\n"; > ?> you should use $newtext = wordwrap( $text, 8, "<br>", 1); instead of $newtext = wordwrap( $text, 8, "\n", 1); because \n is not visiable printed in a browser but <br> is -- Henrik Hansen

« previous php.general (#58285) next »