下面是经过一部分处理的源代码  
  'si,,$exam);          $exam = preg_replace(']*?>'si,,$exam);           $exam = preg_replace(']*?>'si,,$exam);           $exam = str_replace(
,{tr},$exam);           $exam = str_replace( ,{td},$exam);           //去掉 html 标记            $exam = preg_replace(''si,,$exam);          //去掉空白字符             $exam = preg_replace('([rn])[s]+',,$exam);        $exam = preg_replace('/ /',,$exam);           $exam = str_replace( ,,$exam);           $exam = str_replace( ,,$exam);         $exam = explode('{tr}', $exam);        array_pop($exam);               print_r($exam);?>
我想要的是取出下面这一段数据放到数组里,不知道该怎么写了,第一次接触正则感觉看不懂,谢谢各位大神们!  
  [19] => 编号{td}课程{td}日期{td}时间{td}班级{td}考场{td}任课教师{td}[20] => 1{td}流体力学{td}2014-11-0600:00:00.0{td}14:00-16:00{td}土木122{td}ⅲ-209{td}巩妮娜{td}
回复讨论(解决方案)   你是要这样的  
  print_r(array_map(null, explode('{td}', $exam[19]), explode('{td}', $exam[20])));
array(    [0] => array        (            [0] => 编号            [1] => 1        )    [1] => array        (            [0] => 课程            [1] => 流体力学        )    [2] => array        (            [0] => 日期            [1] => 2014-11-0600:00:00.0        )    [3] => array        (            [0] => 时间            [1] => 14:00-16:00        )    [4] => array        (            [0] => 班级            [1] => 土木122        )    [5] => array        (            [0] => 考场            [1] => ⅲ-209        )    [6] => array        (            [0] => 任课教师            [1] => 巩妮娜        )    [7] => array        (            [0] =>             [1] =>         ))
还是这样的  
  print_r(array_combine(explode('{td}', $exam[19]), explode('{td}', $exam[20])));
array(    [编号] => 1    [课程] => 流体力学    [日期] => 2014-11-0600:00:00.0    [时间] => 14:00-16:00    [班级] => 土木122    [考场] => ⅲ-209    [任课教师] => 巩妮娜    [] => )
我想应该是第二种 作为一个数组变量插入到模板中 谢谢大神 
   版主,可以问个小问题吗?[日期] => 2014-11-0600:00:00.0这个数据在页面上是没有00:00:00.0这些的,能去掉吗? 
   $s = '2014-11-0600:00:00.0';echo date('y-m-d', strtotime($s));echo substr($s, 0, 10);
两种方法都可以 
   谢谢版主,如此敬业,感激万分,此贴终结!
   
 
   