At 1/23/2007 05:52 PM, Skip Evans wrote:
I have a requirement to take a large amount of text, a story
submitted to a competition, and split into displayable chunks of 600
words each.
At 1/23/2007 07:20 PM, Anas Mughal wrote:
// textwrap 1.1 Brian Moon <brian@xxxxxxxxxx>
// This code is part of the Phorum project <http://phorum.org>
// $String The string to be wrapped.
// $breaksAt How many characters each line should be.
// $breakStr What character should be used to cause a break.
At 1/23/2007 10:40 PM, Travis Doherty wrote:
Short of string padStr in that function, and bool cut in the native PHP
one, I don't see why someone wouldn't just use http://php.net/wordwrap/ .
Ouch! Inserting hard carriage returns into the markup can only work
when a) the font size is fixed (which we know better than to attempt)
or b) the column width enlarges with the font size in a completely
zoomable page.
If the number of characters per line is allowed to change, as happens
when font size changes in a fixed column width, hard carriage returns
will break the wrap.
Far better to let the browser handle word-wrap.
Regards,
Paul
__________________________
Juniper Webcraft Ltd.
http://juniperwebcraft.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php