// prevent division by zero errors if ($smcolumns==0) { return; } $tableRows = ceil($numSmilies/$smcolumns); for ($i=0; $i<$tableRows; $i++) { $smiliebits .= "<tr align='center'>\n"; for ($j=0; $j<$smcolumns; $j++) { $smiliebits .= "<td>".$smilieArray[$count++]." </td>\n"; } $smiliebits .= "</tr>\n"; }
Show Your Support