loops? tips

From: Date: Thu, 17 Oct 2002 17:27:25 +0000
Subject: loops? tips
Groups: php.general 
Request: Send a blank email to php-general+get-120367@lists.php.net to get a copy of this message
<? $query= "SELECT * FROM models_page WHERE id=$id"; $result= mysql_query($query); $a= mysql_fetch_object($result); ?> <a href="<? print"$a->photo1" ?>" target="_blank">Photo 01</a> <a href="<? print"$a->photo2" ?>" target="_blank">Photo 02</a> <a href="<? print"$a->photo3" ?>" target="_blank">Photo 03</a> <a href="<? print"$a->photo4" ?>" target="_blank">Photo 04</a> <a href="<? print"$a->photo5" ?>" target="_blank">Photo 05</a> <a href="<? print"$a->photo6" ?>" target="_blank">Photo 06</a> <a href="<? print"$a->photo7" ?>" target="_blank">Photo 07</a> <a href="<? print"$a->photo8" ?>" target="_blank">Photo 08</a> <a href="<? print"$a->photo9" ?>" target="_blank">Photo 09</a> <a href="<? print"$a->photo10" ?>" target="_blank">Photo 10</a> let us supose that we want to print out this kind off html how can i make this a shorter piece of code? the url to the picture is stored in a mysql dbase. Or is it possible to make thumbnailed pictures off them. BTW i cannot change the server settings (i rent space)

« previous php.general (#120367) next »