帝国cms php多图获取并赋值数组然后重新两个两个一组输出

<?php
$emsql = $empire->query("select * from `phome_ecms_anli` where `id`='$bqr[id]'");   //id获取信息
$pic_arr = array ();   //加入数组
   while($bqm=$empire->fetch($emsql)){
     $picr=explode(egetzy('rn'),$bqm[uploadimg]);
      for($p=0;$p<count($picr);$p++){
        	$spicr=explode("::::::",$picr[$p]);
				$pic_arr[]=$spicr[1];   //加入数组
		 }
	}
for($i = 0; $i < count($pic_arr); $i+=2){ //加入数组重新分割两个一组展示
?>
	<div class="bb-item">
	            <div class="bb-custom-side page-layout-3" style="background: url(<?=$pic_arr[$i]?>);background-size: 100% 100%;"></div>
	            <div class="bb-custom-side page-layout-3" style="background: url(<?=$pic_arr[$i+1]?>);background-size: 100% 100%;"></div>
	</div>
<?php } ?>