i've been trying various ways to make this work without much success
ended up with a basic code
$code = $_GET['code'];
if($code)
{
// new item selected
if(!isset($_SESSION['recent_list']))
{
$_SESSION['recent_list'] = array();
$_SESSION['recent_list'] [1] = $code;
}
else
{
$_SESSION['recent_list'] [3] = $_SESSION['recent_list'] [2];
$_SESSION['recent_list'] [2] = $_SESSION['recent_list'] [1];
$_SESSION['recent_list'] [1] = $code;
}
}
i am not sure on the best method of creating an array, should i first create an empty array with the first statement which then gets filled by the next statement??
how could i incorporate a check so that the code doesnt already exist in the array, and how could i incorporate the array_push/pop/for statement so that each code will be bumped in the array??
again thanks for any help with this