require ('inc/dbconnect.php'); $query = mysql_query("select * from PORTFOLIO where slideshow"); while ($row = mysql_fetch_array($query)) $slideshow[] = "{ src: 'upload/".$row['png']."' }"; shuffle($slideshow); ?>