Jump to content

db to array


poe

Recommended Posts


i have a db table that has linkid cat id and page number

 

linkid catid page

1 1 1

2 1 1

3 1 1

4 1 2

5 1 2

6 1 2

7 1 3

8 2 1

9 2 1

10 2 1

11 3 1

12 3 1

13 3 2

14 3 2

15 3 3

16 3 3

17 3 4

18 3 4

etc.....

 

 

i need to create this into an array that is in a structure like:

 

array

[catid] =>


 

grouped by catid and just the unique pages

 

so cat1 has pages 1,2,3

cat2 has pages 1

cat3 has pages 1,2,3,4

 

Link to comment
https://forums.phpfreaks.com/topic/74964-db-to-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.