con str_replace dovresti farlo facilmente e in maniera poco stressante per il server...