I know this can be done using preg_replace but I have no idea how to set it up and the only examples I can find online all use a pre defined string (ie - $text = 'this is my text';).
I need to replace certain parts of the string which is being called dynamically from the database with the letter 'X'.
For example.
$from = $row["From"];
Right now, echoing $from will show something like :
011234567889
I want it to output something like :
01123XXXX889
I'm really stumped here so any help greatly appreciated.