Quantcast
Channel: How do i create a 4 dimensional array from a database - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by pferate for How do i create a 4 dimensional array from a database

If you sort each of the columns of your results in your SQL query, you can just loop through each result and compare it with the last entry and adjust your output based on that.SELECT name,...

View Article


Answer by user1191247 for How do i create a 4 dimensional array from a database

How about -$res = mysql_query('SELECT name, overcategory, category, subcategory FROM Products WHERE 1 = 1 ORDER BY overcategory,category,subcategory, name;');$aMenu = array();while($row =...

View Article


Answer by flo for How do i create a 4 dimensional array from a database

You could let mysql sort the result set:SELECT name, overcategory, category, subcategory FROM Products ORDER BY overcategory,category,subcategory;Then you can simply loop over the result. Whenever the...

View Article

How do i create a 4 dimensional array from a database

I'm trying to figure out how to make this code work. Basically i have used MySQL to fetch an associative array containing multiple values.example database: database name = Products...

View Article
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>