if($ROW=mysql_fetch_array($cursor)) { $article_class = $ROW[‘data_3‘] ; $dotNum = substr_count($article_class, ‘`‘) ."<br>"; $rowNum = $dotNum/4; $arr = explode("`",$article_class); for($i=0; $i<=$rowNum; $i++){ for($j=0; $j<4; $j++){ echo $arr[$i*4+$j] ." "; } echo "<br>"; } }
原文地址:http://blog.csdn.net/upi2u/article/details/42651257