MySQL: how would I go about displaying simple “categories” for this?

Chevarcerurge

New Member
I'm wishing for a simple index more or less with my PHP note taking software, each note has a "language" field for the programming language its written in. When I iterate through each entry in a while loop, I'm not sure how i'd list categories of them such as:\[code\]PHP: Note 1 Note 5SQL: Note 2 Note 3\[/code\]Do I need to place all entries in a temporary array with \[code\]if\[/code\]s, like this?\[code\]if($field['language'] == "PHP") $PHPsection[] = $field;\[/code\]Although that doesn't look the best as I'd need to hardcode each section.. I'm stuck.
 
Back
Top