Grouping records from while loop | PHP
Posted
by Wayne
on Stack Overflow
See other posts from Stack Overflow
or by Wayne
Published on 2010-04-04T21:40:48Z
Indexed on
2010/04/04
21:43 UTC
Read the original article
Hit count: 363
I'm trying to group down records by their priority levels, e.g.
--- Priority: High ---
Records...
--- Priority: Medium ---
Records...
--- Priority: Low ---
Records...
Something like that, how do I do that in PHP? The while loop orders records by the priority column which has int value (high = 3, medium = 2, low = 1). e.g. WHERE priority = '1'
The label: "Priority: [priority level]" has to be set above the grouped records regarding their level
© Stack Overflow or respective owner