note 54093 modified in function.wordwrap by danbrown

From: Date: Sun, 17 May 2009 18:33:24 +0000
Subject: note 54093 modified in function.wordwrap by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155139@lists.php.net to get a copy of this message
String lenght control: <?php if (str_word_count($STRING) > 0) $div = strlen($STRING) / str_word_count($STRING); else return " "; if ( $div > 25 ) return wordwrap($STRING, 25, "\n", 1); return $STRING; // Maximum word lenght is 25 chars ?> --was-- String lenght control: if (str_word_count($STRING) > 0) $div = strlen($STRING) / str_word_count($STRING); else return " "; if ( $div > 25 ) return wordwrap($STRING, 25, "\n", 1); return $STRING; // Maximum word lenght is 25 chars http://php.net/manual/en/function.wordwrap.php

« previous php.notes (#155139) next »