getting info from a database with js and php
<p>I really hope someone can point me in the right direction as I am rather new to js.</p>

<p>I have a drop down nav menu the content being populated as below.</p>

<pre><code>var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
anylinkmenu1.items=[
["Page 2 Subpage 1", "http://kellys-webdesigns.com/mpanetwork/index.php? id=8"],
["Page 2 Subpage 2", "http://kellys-webdesigns.com/mpanetwork/index.php? id=9"],
["Page 2 Subpage 3", "http://kellys-webdesigns.com/mpanetwork/index.php? id=10"],
["Page 2 Subpage 4", "http://kellys-webdesigns.com/mpanetwork/index.php? id=11"],
["Page 2 Subpage 5", "http://kellys-webdesigns.com/mpanetwork/index.php? id=12"],
["Page 2 Subpage 6", "http://kellys-webdesigns.com/mpanetwork/index.php? id=13"],
["Page 2 Subpage 7", "http://kellys-webdesigns.com/mpanetwork/index.php? id=14"],
["Page 2 Subpage 8", "http://kellys-webdesigns.com/mpanetwork/index.php? id=15"] 
]
var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
anylinkmenu2.items=[
["Page 3 Subpage 1", "http://kellys-webdesigns.com/mpanetwork/index.php? id=16"],
["Page 3 Subpage 2", "http://kellys-webdesigns.com/mpanetwork/index.php? id=17"],
["Page 3 Subpage 3", "http://kellys-webdesigns.com/mpanetwork/index.php? id=18"],
["Page 3 Subpage 4", "http://kellys-webdesigns.com/mpanetwork/index.php? id=19"],
["Page 3 Subpage 5", "http://kellys-webdesigns.com/mpanetwork/index.php? id=20"],
["Page 3 Subpage 6", "http://kellys-webdesigns.com/mpanetwork/index.php? id=21"],
["Page 3 Subpage 7", "http://kellys-webdesigns.com/mpanetwork/index.php? id=22"],
["Page 3 Subpage 8", "http://kellys-webdesigns.com/mpanetwork/index.php? id=23"] 
]
</code></pre>

<p>The contents are part of a database and rather than manually putting these values in I would like them to be taken from the database, is this possible? I think I need to use php to achieve this and I have no problem with the php code, I’m just not sure how to connect the js to the php.</p>

<p>Any help would be greatly appreciated.</p>
