[英]In PHP i have used the logic to find the digits in a number, but i get a default output which is “325” instead of “4” for four digit number
[英]how to find a number phrase in php which at least have 2 digit
我尝试使用rss代码,我想获取rss代码并在其中找到一个数字短语,这是标记:
bokk 1 is there 23453
shot 3 ao adfsdf 348943
aadd 4 asdis 4321334
adfie 9 aioe 938
如何定义一个模式来推送具有php语言数组中的数字的数字?
我认为eregi()函数可以使用,但不知道如何使用,更多解释是,第一行具有5位数字(23453),第二行具有6位数字(348943),依此类推...如何将这些数字保存在至少有2位数字且数字位数不受限制的数组中,
您可以使用正则表达式:
preg_match_all("/([0-9]{2,})/", $string, $match);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.