Why isn't my autocomplete working?
I am getting data from a mysql database. When I view the source of the page this is what it looks like: 
 $(function(){ var x =["Off-Campus Student Life","Graduate Student Appreciation Week","Graduate Student Life","Graduate Student Appreciation Week","Graduate Student Legal Office","Japanese American Student Association","Graduate Student Legal Aid Office","Free Dinner Dessert included","UMCP Muslim Students' Association","The Episcopal\/Anglican Terps","UMD Arabic Flagship","Graduate Student Legal Aid Office","Graduate Student Government","South Hill Area Council(SHAC), North Hill Area Cou","Off Campus Student Association","Maryland Hilel and NCLT","Off-Campus Student Life","Community Roots","The National Society of Collegiate Scholars","Community Roots","Community Roots","UMD Students for Justice in Palestine","Off Campus Student Association","Nyumburu Cultural Center","Off Campus Student Association","Graduate Student Legal Aid Office","Graduate Student Legal Aid Office","Off Campus Student Association"];
$('#host').autocomplete({x});}); </script><div id='host'><input id = 'host'>


$script = "<html><head>
<script	type='text/javascript' src='bundle/ui/jquery.ui.autocomplete.js'></script
  <script type='text/javascript' src='http://code.jquery.com/jquery-latest.js'></script>
    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js'></script>
    <script type='text/javascript'>
  $(function(){ var x =" . json_encode($data) . ";\n$('#host').autocomplete({x});}); </script>";


echo $script;

echo "<div id='host'><input id = 'host'></div>";

Why isn't my autocomplete working?
===

I am getting data from a mysql database. When I view the source of the page this is what it looks like: 
 $(function(){ var x =["Off-Campus Student Life","Graduate Student Appreciation Week","Graduate Student Life","Graduate Student Appreciation Week","Graduate Student Legal Office","Japanese American Student Association","Graduate Student Legal Aid Office","Free Dinner Dessert included","UMCP Muslim Students' Association","The Episcopal\/Anglican Terps","UMD Arabic Flagship","Graduate Student Legal Aid Office","Graduate Student Government","South Hill Area Council(SHAC), North Hill Area Cou","Off Campus Student Association","Maryland Hilel and NCLT","Off-Campus Student Life","Community Roots","The National Society of Collegiate Scholars","Community Roots","Community Roots","UMD Students for Justice in Palestine","Off Campus Student Association","Nyumburu Cultural Center","Off Campus Student Association","Graduate Student Legal Aid Office","Graduate Student Legal Aid Office","Off Campus Student Association"];
$('#host').autocomplete({x});}); </script><div id='host'><input id = 'host'>


$script = "<html><head>
<script	type='text/javascript' src='bundle/ui/jquery.ui.autocomplete.js'></script
  <script type='text/javascript' src='http://code.jquery.com/jquery-latest.js'></script>
    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js'></script>
    <script type='text/javascript'>
  $(function(){ var x =" . json_encode($data) . ";\n$('#host').autocomplete({x});}); </script>";


echo $script;

echo "<div id='host'><input id = 'host'></div>";
