I'm receiving mobile numbers with country code (in 12 digits) from a API response. But I need the mobile number without the country code (in 10 digits).
What I'm receiving:
919999999999
What I need:
9999999999
What I have tried:
$mobile = "919999999999";
$split = preg_split("/[\]+/", $mobile);
$newmobile = $split[2].$split[3].$split[4].$split[5].$split[6].$split[7].$split[8].$split[9].$split[10].$split[11].$split[12];
I know this is wrong. Please help!