PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
What I'm trying to do is something like this, of course it doesn't work...I'm just not sure if it's possible to create (and reference) session arrays in this manor or if i've got a syntax error:
yep, your right. I wound up having to unset() the ['cart'] session to clear it out because I had done some different testing (without the [''][''] method). thanks for the reply wtf!
np...
webdev extension for firefox has really handy option to clear session variables which I have found very handy when working with sessions. I highly recommend it.
I didn't understand feyd what you are talking about. Please make your comments clearer.
$_SESSION["x"]["y"] means _SESSION is an array and it has an index/element _SESSION["x"] and it's an array and has an index/element _SESSION["x"]["y"]
_SESSION already is an array (php initializes it automagically), $_SESSION["x"] is not (by default).
$_SESSION["x"] = array() makes it an array.