日期:2014-05-17 浏览次数:20443 次
<?php $str="select ziduan1,ziduan2,ziduan3 from"; preg_match("/select\s+(.*)\s*from/",$str,$matchs); $arr = explode(",",trim($matchs[1])); print_r($arr);//Array ( [0] => ziduan1 [1] => ziduan2 [2] => ziduan3 ) ?>