CakeFest 2025 Madrid: The Official CakePHP Conference

Voting

: min(one, six)?
(Example: nine)

The Note You're Voting On

mrbrown8 at juno dot com
24 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