update page now
Longhorn PHP 2026 - Call For Papers

Voting

: five plus two?
(Example: nine)

The Note You're Voting On

mrbrown8 at juno dot com
25 years ago
Just to add to the examples, if replacement is longer than length, only the length number of chars are removed from string and all of replacement is put in its place, and therefor strlen($string) is inreased.

$var = 'ABCDEFGH:/MNRPQR/';
/*  Should return ABCDEFGH:/testingRPQR/   */
echo substr_replace ($var, 'testing', 10, 2);

<< Back to user notes page

To Top