时间:2021-07-01 10:21:17 帮助过:4人阅读
$arr = array(
'https://www.gxlcms.com/images/small_case_1.jpg',
'https://www.gxlcms.com/images/small_case_2.jpg',
'https://www.gxlcms.com/images/small_case_3.jpg',
'https://www.gxlcms.com/images/small_case_4.jpg',
'https://www.gxlcms.com/images/small_case_5.jpg',
'https://www.gxlcms.com/images/small_case_6.jpg',
'https://www.gxlcms.com/images/small_case_7.jpg',
'https://www.gxlcms.com/images/small_case_8.jpg',
'https://www.gxlcms.com/images/small_case_9.jpg'
);
function arr2li($arr){
$html = '';
if(is_array($arr) && !empty($arr)){
$count = count($arr);
for($i=0; $i<$count; $i++){
$rem = $i%3;
$html .= ($i!=0 && $rem==0) ? "\n\r\n\r" : "";
$html .= ($rem==0) ? "
$result=mysql_query("select * from case_list");
while($row=mysql_fetch_assoc($result)){
$ar[]=$row;
}
foreach(array_chunk($ar,3) as $v){
echo "