note 70514 added to function.wordwrap

From: Date: Thu, 19 Oct 2006 10:20:12 +0000
Subject: note 70514 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-118748@lists.php.net to get a copy of this message
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. ---- Server IP: 83.137.20.120 Probable Submitter: 82.93.165.208 ---- Manual Page -- http://www.php.net/manual/en/function.wordwrap.php Edit -- https://master.php.net/note/edit/70514 Del: integrated -- https://master.php.net/note/delete/70514/integrated Del: useless -- https://master.php.net/note/delete/70514/useless Del: bad code -- https://master.php.net/note/delete/70514/bad+code Del: spam -- https://master.php.net/note/delete/70514/spam Del: non-english -- https://master.php.net/note/delete/70514/non-english Del: in docs -- https://master.php.net/note/delete/70514/in+docs Del: other reasons-- https://master.php.net/note/delete/70514 Reject -- https://master.php.net/note/reject/70514 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118748) next »