#آموزش

#آموزش
@BotSorce

♦️اعتبارسنجی شماره های موبایل و ... مربوط به ایران
➖➖➖➖➖➖➖➖
public function IRPhoneCorrection($phone)
{
@ $phone = iconv("UTF-8", "ASCII", $phone);
$phone = preg_replace('/\s+/', '', $phone);
if (substr($phone, 0, 2) === "98")
{
$phone = "+98".substr($phone, 2, 10);
}
else if (substr($phone, 0, 2) === "00")
{
$phone = "+98".substr($phone, 4, 10);
}
else if (substr($phone, 0, 2) === "09")
{
$phone = "+98".substr($phone, 1, 10);
}
else if (substr($phone, 0, 1) === "9" and substr($phone, 0, 2) !== "98")
{
$phone = "+98".$phone;
}
return $phone;
}
}
➖➖➖➖➖➖➖➖
#درخواستی
@BotSorce