PLZ help a n00b at PHP...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
StarFall
Forum Newbie
Posts: 1
Joined: Thu Dec 05, 2002 12:32 am

PLZ help a n00b at PHP...

Post by StarFall »

I will try and explain what i want to be done:

Ok so i have a database in postgresql that contains different categorys, some of wich have the same name. Now what i want is to use php to write a page that will only type out the category once, like this-

Cat1
-bla
-bla
-bla

Cat2
-Bla
-Bla


Im just getting this right now -

Cat1
-bla

Cat1
-bla

Cat1
-bla

Cat2
-Bla

Cat2
-Bla

How do you do it, i understand that im supposed to use "for" loops and that i need to check if the category is the same as the last.

I hope someone understands what im trying to say.

StarFall Out
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

would be helpful if you could post your table structure and the part of your script that querries/outputs the data.
Post Reply