Klokjis Posted November 14, 2005 Report Share Posted November 14, 2005 varianc taads, ka ir switch($_GET['picture']) { case '1': $pic = 'bilde1.jpg'; break; .... kjipa ieraxtiic katrs nosaukums... a kaa buutu vienkaarshaak uztaisiit taa ka pac skripc nolasa foldera saturu un ieraxta masiivos. taa kaa nav sanaacis njemties ar masiiviem, tad jaaluudz kaada paliidziiba. :( uzraku kaut kaadu skriptinju paluureet: $path = "images"; $files = "0"; $handle=opendir($path); while ($file = readdir($handle)) { if(!is_dir($path."/".$file) && $file != "." && $file!="..") { $extension = explode (".", $file); $extension_i = (count($extension) - 1); $ext = $extension[$extension_i]; if($ext=="jpg"||$ext=="jpeg"||$ext=="JPG"||$ext=="JPEG") { $images[$files] = $file; $files++; } } } ... taalaak aiziet tur jau bilzhu skatiishanaas ceru ka saprataat manu ideju :\\ Link to comment Share on other sites More sharing options...
Kristabs Posted November 15, 2005 Report Share Posted November 15, 2005 es nesapratu ko tieshi vajag... vai tikai sho - $bildes_masivs[] = $kaarteejaa_bilde; ? vai attieciigo bildi izvadiit bez switch garaas rakstiishanas(shajaa gadiijumaa nav jeegas no bilzhu masiivaa likshanas, bet vienkaarshi $bilde = "bilde".$_GET['picture'].".jpg" ) vai ko? Link to comment Share on other sites More sharing options...
rpr Posted November 15, 2005 Report Share Posted November 15, 2005 es personiigi nesapratu. $_GET jau arii ir masiivs (peec virsraksta vadoties tev taa neliekas) Link to comment Share on other sites More sharing options...
Recommended Posts