thomashw Posted March 17, 2008 Share Posted March 17, 2008 I have an array of which I want to use to query my database. The key(s) of the array depends on what the user clicks on on my website. Array ( [cart] => Array ( [2] => Array ( ) [1] => Array ( ) ) ) That's how the array is set up, and can be added to as well. I want to query the database depending on the keys (as you can see they aren't in numerical order, and can really be any number.) How can I use these keys to query the database? I'd need to use a loop, as I need to use these keys to extract multiple things. I tried using the SELECT statement where I said the id = $_SESSION['cart'] but I just got errors. 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.