$a = mysql_query("SELECT * FROM lentele"); while ($rezas = mysql_fetch_array($a)) { echo "folderis/sub_folders/".$rezas['paveiksliukas'].""; }