PHP Replace a Character in a String
To replace a character in a string,
use the str_replace function.
See the example:
<?php
echo = str_replace('a', '!', 'abcabc');
?>
Code execution result:
'!bc!bc'
To replace a character in a string,
use the str_replace function.
See the example:
<?php
echo = str_replace('a', '!', 'abcabc');
?>
Code execution result:
'!bc!bc'