Jump to content

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...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.