# PHP: Displaying records by category

**URL:** <https://forum.kirupa.com/t/php-displaying-records-by-category/189366>\
**Category:** programming\
**Created:** [June 1, 2006, 11:21pm UTC](https://forum.kirupa.com/t/php-displaying-records-by-category/189366 "2006-06-01T23:21:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![opel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/opel/32/199_2.png) [@opel](https://forum.kirupa.com/u/opel)\
**Post date:** [June 1, 2006, 11:21pm UTC](https://forum.kirupa.com/t/php-displaying-records-by-category/189366/1 "2006-06-01T23:21:54Z")

</div>

I need help trying to write out all records by category. I have 2 tables created: one for categories and one for the information.

Can anyone tell me how I write out all the records in each category and then before moving on to write the next set?

I am trying to create a list of external links by category but am new to PHP.

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [June 6, 2006, 5:05pm UTC](https://forum.kirupa.com/t/php-displaying-records-by-category/189366/2 "2006-06-06T17:05:25Z")

</div>

hmm… i don’t have much time to look at it until later tonight, but i know i wasn’t having any problems w/the code. you might want to try changing the $row[] variables to include single quotes (ie $row[category\_desc] -\> $row[‘category\_desc’] ).
