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! Link to comment https://forums.phpfreaks.com/topic/96473-using-arrays/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.