Anyone see anything wrong here? The error is at the line with the code "} else {" for ($j=1; $j < (ceil($r['total'] / 10) + 1);$j++) { if ($pp > 40) { echo "<br />"; $pp= 0; } if ($j == ($l / 10)) { echo "<strong>Page " . $j . "</strong> "; } else { if($j != 1) { echo "<a href=\"http://www.site.com/" . $idd . "/" . ($j * 10) . "/\" title=\"" . $idd . " category page " . $j . "\">Page " . $j . "</a> "; } } else { echo "<a href=\"http://www.site.com/" . $idd . "\" title=\"" . $idd . " category page " . $j . "\">Page " . $j . "</a> "; } } $pp++; } Code (markup):
You've placed one } on the wrong place Please structure your code for better understanding! <? for ($j=1; $j < (ceil($r['total'] / 10) + 1);$j++) { if ($pp > 40) { echo "<br />"; $pp= 0; } if ($j == ($l / 10)) { echo "<strong>Page " . $j . "</strong> "; } else { if($j != 1) { echo "<a href=\"http://www.site.com/" . $idd . "/" . ($j * 10) . "/\" title=\"" . $idd . " category page " . $j . "\">Page " . $j . "</a> "; } else { echo "<a href=\"http://www.site.com/" . $idd . "\" title=\"" . $idd . " category page " . $j . "\">Page " . $j . "</a> "; } } $pp++; } } Code (markup):
Your code still gave an error. I removed the LAST } in your code and now it worked but it still seems weird. i guess as long as it works lol.