note 90302 added to function.substr

From: Date: Wed, 15 Apr 2009 14:13:15 +0000
Subject: note 90302 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-153318@lists.php.net to get a copy of this message
If you need to get the first $num Chars of $str and remove them from $str you'll want to use following function: function string_shift(&$str,$num) { $cutOff=substr($str,0,$num); $str=substr($str,$num): return $cutOff; } ---- Server IP: 217.13.201.10 Probable Submitter: 92.72.34.110 ---- Manual Page -- http://www.php.net/manual/en/function.substr.php Edit -- https://master.php.net/note/edit/90302 Del: integrated -- https://master.php.net/note/delete/90302/integrated Del: useless -- https://master.php.net/note/delete/90302/useless Del: bad code -- https://master.php.net/note/delete/90302/bad+code Del: spam -- https://master.php.net/note/delete/90302/spam Del: non-english -- https://master.php.net/note/delete/90302/non-english Del: in docs -- https://master.php.net/note/delete/90302/in+docs Del: other reasons-- https://master.php.net/note/delete/90302 Reject -- https://master.php.net/note/reject/90302 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153318) next »