im trying to validate phone number in php. The requirements are (0d)dddddddd or 0d dddddddd where d is 0-9. This is what I have right now
if(!preg_match("/^0[0-9]{9}$/", $phone))
{
//wrong format
}
I have tried several similar questions, but still cant understand regex very well. Can anyone help me fix the regex?