str_replace replaced with explode/implode to replace only first occurrence