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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -