How to delete a specific array item from PHP session -
One session is attempting to remove an item from the shopping cart. I used no set () Like it did not work
link Unset Unset Sessions See this code result properly
& lt; Td width = "100" & gt; & Lt; A href = "? Id = & lt ;? php echo $ id ;; & gt; and action = delete" & gt; & Lt ;? Php ek $ ide ;? & Gt; & Lt; / A & gt; & Lt; / Td>
if (isset ($ _ GET ['action']) & amp; ($ _ GET [ Verb '] == "delete")) {$ new_id = $ _ GET [' id ']; Not set ($ _ session ['item'] [$ NEW_ID]);
array (1) {[" Id "] = & gt; Int (10)}
& lt ;? Php $ _SESSION ['item'] = array ("id" => 10, "new_id" => 6); Not set ($ _ session ['item'] ["NEW_ID"]); Var_dump ($ _ session ['item']); ? & Gt;
Comments
Post a Comment