PHP beginner |
|
<?php
$links = array("link1", "link2", "link3", "link4", "link5");
$aantal = count($links);
for($i = 0; $i <= $aantal; $i++) {
?>
<div id="Links" onMouseOver="background-color: #000000;" onMouseOut="background-color: #FFFF00;" style="background-color: #FFFF00;"><?php echo $links[$i]; ?></div><BR />
<?php
}
?>
<?php $links = array("link1", "link2", "link3", "link4", "link5"); for($i = 0; $i <= $aantal; $i++) { ?> <div id="Links" onMouseOver="background-color: #000000;" onMouseOut="background-color: #FFFF00;" style="background-color: #FFFF00;"> <?php echo $links[$i]; ?></div><BR /> <?php } ?>
Ik heb dit script, ik wil dus als je erover heen gaat dat hij dan #000000 wordt, maar dit gebeurd niet!
|