note 70514 deleted from function.wordwrap by bobby

From: Date: Thu, 19 Oct 2006 14:34:26 +0000
Subject: note 70514 deleted from function.wordwrap by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118757@lists.php.net to get a copy of this message
Note Submitter: Edward ---- A small bugfix for the 'justify' function I posted earlier: <? $index = ($index + 1) % $wordcount; ?> should read <? $index = ($index + 1) % ($wordcount - 1); ?> This ensures that spaces are added at the end of all words except the last one. Without this code, the text won't be justified correctly.

« previous php.notes (#118757) next »