Re: wordwrap()

From: Date: Tue, 17 Jul 2001 17:07:40 +0000
Subject: Re: wordwrap()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58295@lists.php.net to get a copy of this message
Hey Ty, I had the same problem. I read somewhere that you can use "\r\n" instead. \r returns home and \n adds a new line! It works fine here! Rehuël "Tyler Longren" <tyler@captainjack.com> wrote in message news:00aa01c10ed3$a3253ee0$0ab8453f@captainjack.com... > 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"; > ?> > > Here's the output: > A very long wooooooo ooooord. > > Here's what the manual says the output should be: > A very > long > wooooooo > ooooord. > > Has anyone else had troubles with the wordwrap() function? Do I need to > compile php with another flag to get this to work properly? > > Thanks, > Tyler > >

« previous php.general (#58295) next »