Update lib/PPUtils.php

Simplified function by using a single str_replace() instead of many.
Same functionality and easier to read.