时间:2021-07-01 10:21:17 帮助过:8人阅读
$a = "'你好(39)','你好啊(60)','他好(52)','他好啊(23)','我好(80)','我好啊(99)'";
$a = "'你好(39)','你好啊(60)','他好(52)','他好啊(23)','我好(80)','我好啊(99)'";
$arr = explode('\',\'', trim($a, '\''));
$newArr = array();
foreach ($arr as &$value) {
if (preg_match('/[\d]+/', $value, $match)) {
if (isset($match[0])) {
if ($match[0] > 50) {
$newArr[] = '\''.$value.'\'';
}
}
}
}
echo '"'.implode(',',$newArr).'"';