note 61458 added to function.substr

From: Date: Sat, 04 Feb 2006 02:37:41 +0000
Subject: note 61458 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-102952@lists.php.net to get a copy of this message
Here's a function I wrote that'll insert a string into another string with an offset. // $insertstring - the string you want to insert // $intostring - the string you want to insert it into // $offset - the offset function str_insert($insertstring, $intostring, $offset) { $part1 = substr($intostring, 0, $offset); $part2 = substr($intostring, $offset); $part1 = $part1 . $insertstring; $whole = $part1 . $part2; return $whole; } ---- Server IP: 193.27.201.10 (proxied: 193.27.201.10 1.0 www1.shellkonto.se:3128 (squid/2.5.STABLE4)) Probable Submitter: 81.231.104.240 ---- Manual Page -- http://www.php.net/manual/en/function.substr.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61458 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61458&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61458&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102952) next »