I'm trying to retrieve the response of this script:

```
<?php
require_once("db_connect.php"); 
$get = mysql_query("SELECT name FROM main");
$genres;
while ($row = mysql_fetch_array($get)) {
    $genres[] = $row['name'];
}
echo json_encode($genres); 
?>

```

And get it back in javascript and store it in a variable, so when I do variable[i] in a loop I'll get the ith genre name.