MySQL and PHP - For Each?

Talascesk

New Member
I have following code:\[code\]SELECT q21, q21coding AS Description FROM `tresults_acme` WHERE q21 IS NOT NULL AND q21 <> '' ORDER BY q21coding\[/code\]It brings back the following (excerpt):\[code\]Text DescriptionLack of up to date equal pay cases&legislation - t... Content needs updatingThe intranet could contain more "up to date traini... Content needs updatingPoorly set out. It is hard to find things. Difficulty in navigating/finding contentOnly use the intranet as a necessity. Will ask my ... Difficulty in navigating/finding content\[/code\]Now, I'd like to display this in a table on a PHP page but am having some problems because of the way I'd like it displayed, it needs to be as follows:\[code\]Content needs updating----------------------[List all the comments relating to this description]Difficulty in navigating/finding content----------------------------------------[List all the comments relating to this description]\[/code\]and so on.Now I think it is a For Each loop in PHP but I am having terrible difficulty getting my head around this - any ideas and suggestions very very welcome!Thanks,
 
Back
Top