Page 1 of 1

PLZ help a n00b at PHP...

Posted: Thu Dec 05, 2002 12:32 am
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

Posted: Thu Dec 05, 2002 3:04 am
by volka
would be helpful if you could post your table structure and the part of your script that querries/outputs the data.