Replace leading digits in a string if consists of optional zeros then 2 specific numbers – PHP
I get a phone number, where I would like to replace 0049 049 49 with a null. I can do it like this: $phone = str_replace("0049", "0", $phone); // and so on But for the case that a "049" is…