【发布时间】:2013-10-28 19:35:53
【问题描述】:
我正在使用以下代码来显示缩略图库。此代码取自另一个 stackoverflow 问题
$count=0;
$arr=array('a', 'b', 'c', 'd');
while ($row = mysqli_fetch_array($query)) {
$img = $row["fn"];
if (empty($img)) { break; }
$thumb = 'images/th_'.$img;
if ($count == 8) { break; }
$i=$arr[$count%4];
$ths.='<div class="ui-block-'.$i.'"><img src="'.$thumb.'"></div>';
$count++;
};
我不明白 $row["fn"];我在谷歌找不到任何东西。 “fn”是格式化字符的一部分(例如 \n)吗?抱歉问了这么一个基本问题,但我真的在别处找不到答案,我已经找了两个小时了。
【问题讨论】:
标签: php mysqli formatting row