В любом случае, я могу очистить
if($class == 2 AND $posts >=1){$showpost ="1";} else {$showpost ="$posts"; if($class == 3 AND $posts >=2){$showpost ="2";} else {$showpost ="$posts"; if($class == 4 AND $posts >=3){$showpost ="3";} else {$showpost ="$posts"; if($class == 5 AND $posts >=4){$showpost ="4";} else {$showpost ="$posts"; if($class == 6 AND $posts >=5){$showpost ="5";} else {$showpost ="$posts"; if($class == 7 AND $posts >=6){$showpost ="6";} else {$showpost ="$posts"; }}}}}}
Поскольку я не хочу}}}}}} в конце.