note 80423 added to function.wordwrap

From: Date: Tue, 15 Jan 2008 11:42:56 +0000
Subject: note 80423 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-135115@lists.php.net to get a copy of this message
<?php #for those who don't like word-wrap function ($string, $max_length) { $a_string = explode(" ",$string); foreach ($a_string as $value) { if (strlen($value) > $max_length) { $length = strlen($value); $repeats = $length / $max_length; for ($i=0; $i<$repeats; $i++) { $str = substr ($value,($i*$max_length),$max_length); print "<font color=red>".$str."</font><br />"; } } else { print $value."<br />"; } } } ?> ---- Server IP: 194.145.210.3 Probable Submitter: 217.41.34.61 ---- Manual Page -- http://www.php.net/manual/en/function.wordwrap.php Edit -- https://master.php.net/note/edit/80423 Del: integrated -- https://master.php.net/note/delete/80423/integrated Del: useless -- https://master.php.net/note/delete/80423/useless Del: bad code -- https://master.php.net/note/delete/80423/bad+code Del: spam -- https://master.php.net/note/delete/80423/spam Del: non-english -- https://master.php.net/note/delete/80423/non-english Del: in docs -- https://master.php.net/note/delete/80423/in+docs Del: other reasons-- https://master.php.net/note/delete/80423 Reject -- https://master.php.net/note/reject/80423 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135115) next »