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 ArticleAnswer 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 ArticleAnswer 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 ArticleHow 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