I would love a fresh pair of eyes looking at my problem which is driving me mad. Any help would be appreciated.
From just 2 lines of PHP code im trying to strip the first '44' if a user enters it at the start of there phone number:
$telephone = '44789562356';
$telephone = str_replace(' ','',$telephone);
$telephone = str_replace('+44','0',$telephone);
if(strpos($telephone,"44")==0){
$telephone = substr($telephone,2);
$telephone = '0'.$telephone;
}
Why is it that it strips '7's from all the phone numbers?