function Getimgs($aid, $num = 0){ global $dsql; $imgurls = ''; $row = $dsql -> getone("Select imgurls From`dede_addonimages` where aid='$aid'"); // 查询图片集sql by www.dede58.com $imgurls = $row['imgurls']; preg_match_all("/{dede:img ddimg='(.*)' text='(.*)' width(.*)}(.*){/dede:img/isU", $imgurls, $wordcount); //调用图片路径和图片alt属性 $count = count($wordcount[4]); if ($num > $count || $num == 0){ $num = $count; } for($i = 0;$i < $num;$i++){ $imglist .= ''; //赋值到html标签 } return $imglist; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)