Re: Sentence Break

From: Date: Mon, 08 Oct 2001 08:47:11 +0000
Subject: Re: Sentence Break
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70332@lists.php.net to get a copy of this message
Example 1. wordwrap() example $text = "The quick brown fox jumped over the lazy dog."; $newtext = wordwrap( $text, 20 ); echo "$newtext\n"; This example would display: The quick brown fox jumped over the lazy dog. Example 2. wordwrap() example $text = "A very long woooooooooooord."; $newtext = wordwrap( $text, 8, "\n", 1); echo "$newtext\n"; This example would display: A very long wooooooo ooooord. Andrey Hristov IcyGEN Corporation BALANCED SOLUTIONS http://www.icygen.com On Monday 08 October 2001 11:41, you wrote: > Hi > > Is there any PHP command or class that takes a sentence and breaks it to > any given length without breaking the words in the middle? > > Sincerely > > berber > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net --

« previous php.general (#70332) next »