Neviem, či je to naozaj riešenie na tvoje problémy, ale na základe mojej skromnej analýzy ponúkam nasledovné vysvetlenie (a riešenie):
V tej podmienke if napĺňaš premennú imgresult nejakými dátami. Keď sa však ten cyklus opakuje, nové dáta vždy prepíšu tie staré. Preto treba namiesto operátora priradenia
= použiť operátor "doplnenia" (neviem, či sato tak naozaj volá)
.=. Takže tvoj kód bude vyzerať takto:
Kód:
function listImages ($imgnum, $game_id, $type) {
$imgsrc = 'images/about/'.$game_id.'/'.$type.'/';
for ($i=1; $i<=$imgnum; $i++) {
$imgs = $imgsrc.$i.'s.jpg';
$imgsrc = $imgsrc.$i.'.jpg';
if (file_exists ($imgsrc) && file_exists ($imgs)) {
$imgresult .= '<a onclick="window.open(\'gallery_popup.phtml?gallery='.$game_id.'&type='.$type.'&id='.$i.'\', \'gallery\', \'width=800,height=600,scrollbars=no,top=20,left=20,resizeable=yes\');return false" href="gallery_popup.phtml?gallery='.$game_id.'&type='.$type.'&id='.$i.'" target="_blank"><img src="'.$imgs.'" class="gallery-img" alt="Obrázok '.$i.'"></a>';
return $imgresult;
}
}
}
Niečo o tom je aj tu:
http://www.php.net/manual/sk/language.o ... gnment.php _________________
A. S. Tanenbaum píše:
The terms LF, MF, and HF refer to low, medium, and high frequency, respectively. Clearly, when the names were assigned, nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super, Extremely, and Tremendously High Frequency bands. Beyond that there are no names, but Incredibly, Astonishingly, and Prodigiously high frequency (IHF, AHF, and PHF) would sound nice.