Hi,
I was wondering if anyone can see why the substr_replace() function isn't replacing the 'XXXXX' with the random integer I am creating in the script below:
<?php
$password = rand(12345,98765);
$stringtoparse = 'Your new password is XXXXX';
substr_replace($stringtoparse,$password,18);
echo $stringtoparse;
?>
When I run this, I still have the following being output:
Your new password is XXXXX
Can anyone see why the function wouldn't be working as I expect and replace the XXXXX with the random number being generated?
Many thanks for any help!
:)