robert_gsfame Posted July 23, 2010 Share Posted July 23, 2010 <?php $id=urldecode(base64_decode($_GET['product_id'])); $explode=explode(";",$id); $count=count($explode); for($i=0;$i<$count;$i++) { if(in_array(base64_encode($explode[$i]),$_SESSION['basket'])) { $x=""; $x=array_search(base64_encode($explode[$i]),$_SESSION['basket']); unset($_SESSION['basket'][$x]); } } ?> The problem is let say i have 3 records and unset() 2 of them, i will still have 1 record but i dont know which part is wrong, i got it not as a first index of an array which is $_SESSION['basket'][0] but $_SESSION['basket'][1] i found $_SESSION['basket'][0] empty thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.