note 97364 deleted from function.substr by danbrown
| From: | danbrown@php.net | Date: | Thu, 15 Apr 2010 22:54:11 +0000 |
| Subject: | note 97364 deleted from function.substr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168303@lists.php.net to get a copy of this message | ||
Note Submitter: george dot langley at shaw dot ca
----
A working example of biner(gf)'s great code below (thanks, BTW!):
$str = "aa bb ccc ddd ee fff gg hhh iii";
echo substr(($str=wordwrap($str,22,'\n')),0,strpos($str,'\n'));
Then replace the 22 with a 23 and see what you get.