mysql - PHP Multiple 2/3-D Arrays sorting, adding, removing -


ok have 4 arrays. 2 built based on original query uses curl list of names , email address's partner site of sorts, other array email address's same site use in query database, can see whether or not email address's obtained in db or not, if ones go array while ones aren't go yet array. mean thinking through way much. have need name , email address's. first array looks like..

array(   [errors] = "none",   [output] = array (              array(name, email)              array(name, email)              array(name, email)              array(name, email)              array(name, email)   ) ) 

then second array have basically

array(email, email, email, email) 

from implode() use in in() query db see whats in, whats not. problem here loosing names , first array becomes pointless. guess trying figure out there way can keep first array , break apart use in 3rd , 4th arrays mentioned above.

i guess question is. approaching logic correctly? there way can tackle without many arrays?

i create single array using email key , operations on that.

array(   'test@test.com' => array(     'name' => 'mr test',     'duplicate' => 0   ),   'foo@bar.com' => array(     'name' => 'bond, james',     'duplicate' => 0   ) ) 

create temporary string database query, either new array or while you're building original data.

when checking results duplicates set duplicate in array. can later loop through , operations based on that.

hope helps?


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -