I have an array variable that is set, then put into a session variable. All is good so far, but how can I remove a specific variable from the array?
I have tried basically copying and pasting this, and adding a foreach loop. Inside this foreach loop, the array is split apart and I tried using unnset, but I couldn't get it to work, so I deleted the code. Here is how I built the array: if ($_POST['4_Add'] != "") { if (($_POST['Frequent_Guest_Program'] != "") && ($_POST['Frequent_Guest_Number'] != "")) { $array = array(); $new = "{$_POST['Frequent_Guest_Program']},{$_POST['Frequent_Guest_Number']}" ; $old = $_SESSION['Frequent_Guest']; $array = array_merge($old, $new); $_SESSION['Frequent_Guest'] = $array; } header("Location: profile4.php"); } Thanks, Jake McHenry Nittany Travel MIS Coordinator http://www.nittanytravel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php