<?php $fname = "foo.jpg"; $ext = '.jpg'; var_dump( str_replace('.jpg','.'.$ext,$fname));
You have javascript disabled. You will not be able to edit any code.