is it posible to pass information held inside a MySQL database into a javascript array using PHP code? something like:
$sql = mysql_query("SELECT * FROM uploads WHERE ref_id = '$refID'");
//javascript below
var array = new Array()
while(<?php echo $row = mysql_fetch_array($sql)?>)
{
array.push(<?php echo $row['name']; ?>)
}
or am I missing something here? of cource this is assuming that I have already defined the $refID and everything else is working propperly, should this build the array I am trying to create?