I need to replace some string in a PHP code to make it look better. What would be the best way to go about that?
preg_replace
Is a good way to go and uses regular expressions so you have flexibility as to how to do it.