Jump to content

Multi-Dimensional array Count


claudfs

Recommended Posts

This is how my db structure looks, i have around 350 rows like this one below each with a different number of comment_list and likes from friends.

 

 

All i want is a query that counts how many times each variable comes up in the db.

 

For example if we ran the query in this script we would get:

 

1.) 65653171 (3 Times)

2.) 67418530 (1 Time  )

 

etc...

 

Any Ideas???

 

[0] => Array

                (
                    [viewer_id] => 65653171
                    [source_id] => 65653171
                    [actor_id] => 65653171
                    [comments] => Array

                        (

                            [comment_list] => Array
                                (
                                    [0] => Array
                                        (
                                            [fromid] => 67418530
                                        )
                                    [1] => Array
                                        (
                                            [fromid] => 108832181
                                        )
                                )
                        )
                        
                    [likes] => Array
                       
                       (
                            [friends] => Array
                            (
                                [0] => 58579401
                                [1] => 55125266
                                [2] => 57449386
                                [3] => 60906602
                                )
                            )
                        )

Link to comment
https://forums.phpfreaks.com/topic/180100-multi-dimensional-array-count/
Share on other sites

  • 2 weeks later...

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.