The substr_replace() function used for replaces a part of a string with another string.
Syntax
substr_replace(string,replacement,start_position,length)
Example
echo substr_replace("Hello Ravi","Dear",0);
Output
Dear
Copyright ©2022 coderraj.com. All Rights Reserved.