Need to manipulate a global var, but can't in Ajax. Need a way around this
<p><a href="http://pastebin.com/x5UnA1sE" rel="nofollow">http://pastebin.com/x5UnA1sE</a></p>

<p>Here's a paste of a bit of my troubled coded.</p>

<p>I'm trying to manipulate a global variable "data" within the jQuery.get callback function in order to format the data and return this data where it is needed.</p>

<p>However, this global variable is not manipulated at all in the callback function most likely due to Ajax being asynchronous. </p>

<p>How can I get the information I need from the database and eventually return it into a variable as I'm trying to do in this code? </p>

<p>Any direction would be much appreciated!</p>

<p>Thanks</p>
