Hello, can anyone help me with how to create a list with php this type of array. The data comes from two tables, Categories and Products.
I'm using MySQL to fetch the data from the two tables.
My tables:
Categories = > id, name
Products = > id, category_id, name, value
[ { "id": "1", "nome": "Pizzas", "lista": [ { "NOME": "Pizza Pequena", "VALOR": "30" }, { "NOME": "Pizza Media", "VALOR": "30" } ] }, { "id": "2", "nome": "Bebidas", "lista": [ { "NOME": "Refri", "VALOR": "3" }, { "NOME": "Suco", "VALOR": "2" } ] } ]
I've tried more just to list the categories.