Ok, I wrote this script based on a tutorial I have read to test out what I had learned(or though I learned, anyway)
<?
$headers = array(
'header1' => 'test2.php?s=1',
);
$sublinks = array(
'Sub1' => 'www.test.com',
'Sub2' => 'action1.php?s=2&b=1',
'Sub3' => 'www.test3.com'
);
foreach($headers as $key => $value) {
echo "<a href='$value'>$key</a><br>";
if(($s == "1") && ($key == "header1")) {
foreach ( $sublinks as $key => $value ) {
echo "<a href='$value'>$key</a><br>";
}
}
}
?>
My problem is, the first array is printed, but whenever I click the link to open the sub-links, nothing happens. It just changes the page to test.php?s=1. I have no idea why it doesn't work, it doesn't give me parse errors or anything.