How do I make a variable from $.get jquery
<p>I'm quite new to jquery and have come up against a glitch. Basically, I have a very basic query script that accesses a php file to returns an array for a datechecker on a calendar.</p>

<p>I have the alert there, and it is telling me that the array is being sent correctly, but I just can't get the unavailableDates variable to act on it. </p>

<p>Here's the jquery script</p>

<pre><code>$.get("sql.php",function(data,status)

{
/* alert("Data: " + data + "\nStatus: " + status); */
result = data;
return result;
});

var unavailableDates = result; /*result is an array. In this format it works, var unavailableDates = ["1-1-2013"]; */
</code></pre>

<p>And here's the basic php script it's accessing:</p>

<pre><code>&lt;?

$row[0] = "01-01-2013";
$row[1] = "02-01-2013";
$row[2] = "03-01-2013";

echo $row;

?&gt;
</code></pre>
