php - Need an Array Count On Common Values -


I am using PHP and MySQL, Apache

I have an array

  array ([2] => array ([0] => 6 [1] => 2) [1] = & gt; Hey ([0] = & gt; ; 6 [1] = & gt; 2))   

Here is the Medium Container Document ID and the Last Child's User Ids, here I am going to measure general user id between all the different documents I want to find a way.

Can anyone guide me to achieve this?

Thanks in advance, Om

/ Div>

  $ Unique_users = array (); Forex currency ($ doc_id = & gt; $ user as $ document) {foreach ($ user_id as $ user) {if (! Isset ($ unique_users [$ user_id])) $ unique_users [$ user_id] = array ($ Doc_id); Other $ unique_user [$ user_id] [] = $ doc_id; }} Reckoning count ($ unique_users); // Number of users var_dump ($ unique_users [1]); // user_id # 1 is in the list of documents    

Comments