With php I am trying to get data from 2 different tables :
Table : products +-------+---------+----------+ | pcode | product | category | +-------+---------+----------+ | 1 | jeans | men | +-------+---------+----------+ | 2 | shirt | men | +-------+---------+----------+ Table : colors +-------+---------+ | pcode | colors | +-------+---------+ | 1 | blue | +-------+---------+ | 1 | black | +-------+---------+ | 1 | white | +-------+---------+ | 2 | yellow | +-------+---------+ Result I want should be like : +-------+---------+----------+---------------------+ | pcode | product | category | colors | +-------+---------+----------+---------------------+ | 1 | jeans | men | black, blue, white | +-------+---------+----------+---------------------+ | 2 | shirt | men | yellow | +-------+---------+----------+---------------------+
Please guide me.
Thanks in advance.
Vikram