Hi,
Is it possible to use a next() function with a session array?? I would need
to forward the array internal pointer each time I reload the page, so I
thought I could use this function with a session variable. When I did this,
the first time it worked. But not the second time. Here´s the code:
<?
session_start();
?>
<BODY>
<?PHP
if ($adv) {
I forward and print the next item in the array
print "Next<br>";
print next ($a);
print "Total : ".count($a)."<br>";
} else {
I delcare the original array and store it as a session
$a[] = "1";
$a[] = "2";
$a[] = "3";
$a[] = "4";
reset ($a);
print "Actual : ".current($a)."<br>";
print "Total : ".count($a)."<br>";
session_register("a");
}
?>
<a href="test.php3?<?=SID?>&adv=1">NExt</a>
</BODY>
So what I need is this: when the user clicks on the link, the internal
pointer should forward one item.
What I´m doing wrong?? Or the Next() function doesn´t work with sessions??
Thanks!