var webpageArray = [
$query = "SELECT URL FROM ...."
$result = mysql_query($query) or die( mysql_error() );
$delimiter = "";
while ( $row = mysql_fetch_array($result) )
echo $delimiter . '"' . $row . '"' ;
$delimiter = ",\n";
I don't use PHP, but that seems simple enough for even me to do.
There may be more efficient ways in PHP, but I can't see why that won't work.