Array newbie

From: Date: Fri, 04 Aug 2000 15:43:24 +0000
Subject: Array newbie
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10155@lists.php.net to get a copy of this message
I have a function that whips through a database, looking for records that match $X. What I'd like to do, is return from the function with an array of indexes to matching records. Something like this: $Name_Array = Check_Name(); #Function which looks for names $Address_Array = Check_Address(); $CSZ_Array = Check_CSZ(): Within Check_Name, can I do something like: $Name_Array = array_merge($Name_Array,$Reference) or do I need to do this? $Reference_Array = array($Reference); $Name_Array = array_merge($Name_Array,$Reference_Array); The idea is that each spin through the Db, when I pick up a match, $Name array picks up an element, and eventually looks like: 1,19, 33.... to whatever. In the end, I'll check to see if there are any common elements in all three arrays. More elegant that what I'm doing now, I think. -- Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

« previous php.general (#10155) next »