ID: 39962
User updated by: pjoe444 at hotmail dot com
Reported By: pjoe444 at hotmail dot com
Status: Open
Bug Type: Feature/Change Request
PHP Version: 5.2.0
New Comment:
( SUBTRACTION, on the other hand, does work simply enough with the
current system:
with SUBSTR_REPLACE being able to replace a character with an empty
string "" )
Previous Comments:
------------------------------------------------------------------------
[2006-12-27 14:42:30] pjoe444 at hotmail dot com
Description:
------------
SUGGESTION to the PhP Group
(I did not find any place for suggestions on the site:
the suggestion links seem to point here)
How about a SUBSTR_ADD function similar to substr_replace
substr_add (mixed string, string replacement, int start [, int length]
)
example when handling time (in schedules etc)
$var=1245
$var= substr_add ($var, ':', 2);
$var value now 12:45
Yes-- you can split and add and rejoin strings, or probably use
preg_replace, but I am surprised that such a simple useful facility
does not seem to be available in PHP ! :-( Thanks! Peter
Douglas
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39962&edit=1