21,893
社区成员




<?php
$body_htm="hello commet_post_1.htm world";
$arr=array(
array("slide_1.htm" ,""),
array("commet_post_1.htm" ,"commet_1")
);
foreach($arr as $k=>$v){
$regex="#".$v[0]."#";
if(preg_match($regex,$body_htm)){
echo "the first if: $v[1]<br>";
if($v[1]=""){
echo "empty";
}else{
echo "the second if: $v[1]<br>";
}
}
}
?>