输入banner图图片脚本导航/分类

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);

2、
if (!preg_match("/^[0-9]+$/",$id12)) {$a=1;}