Guys, good day. im starting to learn mysql and still fiddling around. I just saw a table structures just like the example. How can i achieve an array querying in sql when i use var_dump in php? more power!
Table: categories
id | name |
1 | Cat A |
2 | Cat B |
Table: sub_categories
id | category_id | name |
1 | 1 | Sub Cat A |
2 | 2 | Sub Cat B |
array
'Cat A' =>
array
1 => string 'Sub Cat A' (length=9)
'Cat B' =>
array
2 => string 'Sub Cat B' (length=9)