Does anyone know if this function can return an internal counter to find out how many times a replacement has been done?
I have a suspicion it doesn’t so I’ll probably have to write a function that replaces and counts how many times it does so.
If anyone has any bright ideas or links to example code please let me know. I’ve started writing a clunky version that uses strpos() to find a the location of several words in a string, but doesn’t handle the replacement. There must be a better way!