Ver original$string = "macbook_pro_thumb.jpg";$string = str_replace("_thumb.", ".", $string);echo $string;