Home >Backend Development >PHP Tutorial >spliti和ereg用新函数preg_split(),preg_match()怎么重写下面两句话
1,$sql=select * from huiyuan where id=1;
list($sel, $sql) = spliti("FROM", $sql);
2,if (!ereg("^[0-9]+$",$id12) {$a=1;}
1、
list($sel, $sql) = preg_split("/FROM/i", $sql);
if (!preg_match("/^[0-9]+$/",$id12)) {$a=1;}