php验证手机号码的方法

  1. if(preg_match("/^13[0-9]{1}[0-9]{8}$|15[0189]{1}[0-9]{8}$|189[0-9]{8}$/",$mobilephone)){     
  2.     //验证通过     
  3.           
  4. }else{     
  5.     //手机号码格式不对     
  6.           
posted @ 2016-01-18 17:56  八路逆袭寡妇村  阅读(255)  评论(0编辑  收藏  举报
www.zxzidian.com