note 97364 added to function.substr

From: Date: Thu, 15 Apr 2010 22:15:50 +0000
Subject: note 97364 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-168302@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 208.118.111.18 ---- Manual Page -- http://www.php.net/manual/en/function.substr.php Edit -- https://master.php.net/note/edit/97364 Del: integrated -- https://master.php.net/note/delete/97364/integrated Del: useless -- https://master.php.net/note/delete/97364/useless Del: bad code -- https://master.php.net/note/delete/97364/bad+code Del: spam -- https://master.php.net/note/delete/97364/spam Del: non-english -- https://master.php.net/note/delete/97364/non-english Del: in docs -- https://master.php.net/note/delete/97364/in+docs Del: other reasons-- https://master.php.net/note/delete/97364 Reject -- https://master.php.net/note/reject/97364 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168302) next »