PHP提取字符串中的数字

function number($str) { return preg_replace(‘/\D/s’, ”, $str); } // echo 123456…