Well I've made a simple script here (use your includes where I output the texts):
--- start test.php ----
<?php
session_start();
if(!isset($TOGGLED)) {
session_register('TOGGLED');
$TOGGLED = array();
$TOGGLED[] = "Toggled Values";
}
if(isset($toggle)) {
$result = array_search($toggle, $TOGGLED);
if($result = array_search($toggle, $TOGGLED)) {
$tmparray = array_slice($TOGGLED, 0, $result);
if(count($TOGGLED) > $result) {
$tmparray2 = array_slice($TOGGLED,$result+1, count($TOGGLED));
$TOGGLED = array_merge($tmparray, $tmparray2);
} else
$TOGGLED = $tmparray;
} else {
$TOGGLED[] = $toggle;
}
}
$text1 = "Here is text 1.";
$text2 = "Here is text 2.";
echo "<pre>\n";
print_r($TOGGLED);
echo "</pre>\n";
?>
<table>
<tr>
<td>
<?php
echo "<a href=test.php?toggle=1>toggle1</a>";
?>
</td>
</tr>
<tr>
<td>
<?php
echo "<a href=test.php?toggle=2>toggle2</a>";
?>
</td>
</tr>
<tr>
<td><?php if(array_search(1, $TOGGLED)) echo "<br>".$text1."<br>"; ?> </td>
</tr>
<tr>
<td><?php if(array_search(2, $TOGGLED)) echo "<br>".$text2."<br>"; ?> </td>
</tr>
</table>
---- end test.php ----
Hope that helps.
Cheers.