Klokjis Posted December 21, 2005 Report Share Posted December 21, 2005 echo 'Lapa: '; if ($page_skaits >= 1) { echo '<a href="?id='.$_GET['id'].'&page=1">'; if ($_GET['page'] == 1 || !$_GET['page']) { echo '<b>1</b>'; } else { echo '1'; } echo '</a> '; if ($page_skaits >= 2) { echo '<a href="?id='.$_GET['id'].'&page=2">'; if ($_GET['page'] == 2) { echo '<b>2</b>'; } else { echo '2'; } echo '</a> '; if ($page_skaits >= 3) { echo '<a href="?id='.$_GET['id'].'&page=3">'; if ($_GET['page'] == 3) { echo '<b>3</b>'; } else { echo '3'; } echo '</a> '; ... } } }; varianc taad, ka te taa lapu numeraacija ir taa kaa saviiti if. ja vairaak, tad tik liek klaat. a kaa vienkaarshaak vareetu saiisinaat sho visu garo skriptu ?? kaadas idejas? -> http://paste.php.lv/3000 Link to comment Share on other sites More sharing options...
hmnc Posted December 21, 2005 Report Share Posted December 21, 2005 masīvs, loģiski, ka! + neaizmirsti, ka atvērtā lapa ir tikai viena! Link to comment Share on other sites More sharing options...
ohmygod Posted December 21, 2005 Report Share Posted December 21, 2005 (edited) Like this? for($i=1; $i<=$page_skaits; $i++){ if($i==$_GET['page']){echo '<b>'.$i.'<b>';} else {echo $i;} } Edited December 21, 2005 by ohmygod Link to comment Share on other sites More sharing options...
Recommended Posts