This is a quick "stab" at it, but this may work for you:
$mobileno = $_POST['mobileno'];
$findme = '07';
$pos = strpos($mobileno, $findme);
if($pos === 0)
$replace = $substr($mobileno,0,2);
You may want to try making $mobileno = to a number with "07" occurring more than once to make sure that only the first occurrence is replaced.