$demo_string = "The Godfather: Part II"; $demo_string = str_replace(':', '', $demo_string); $demo_string = str_replace(' ', '', $demo_string);