überleet |
|
Citaat: //Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="index.html">Main Page</a>'
menu1[1]='<a href="athletics.html">Athletics Home</a>'
//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="Sports/football/main.html">Football</a>'
menu2[1]='<a href="#">Soccer</a>'
menu2[3]='<a href="Sports/crosscountry/main.html">Cross-Country</a>'
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="Sports/boysbasketball/main.html">Basketball</a>'
menu3[1]='<a href="#">Wrestling</a>'
menu3[2]='<a href="Sports/swimming/main.html">Swimming</a>'
dit wil ik bekomen en dus probeerde ik volgende functie uit om te testen (dus nog geen waarde, maar zelfs daar loopt het vast)
Citaat: $array[1] = 'blaat';
$array[2] = 'blaat';
$array[3] = 'blaat';
$i=1;
$javascript = '<script>';
while($array[$i] != null){
$javascript .= 'var menu' .$i . '=new Array()
menu1[0]='<a href="index.html">Main Page</a>'
menu1[1]='<a href="index.html">Main Page2</a>'
';
$i++;
}
$javascript .= '</script>';
echo $javascript;
?>
|