hi guys,
hope to get a little bit of help with this
just thought anyone might have a better solution for this
i have 2 non numerically indexed arrays, with the same structure...
each record has a specific type determined in eg. column ['type'] and 5 types exist
what's the best way of comparing these two so that i can determine
if the records of type 1 differ in value /
if type 1 exists for array 1 /
if type 1 exists for array 2
currently i'm doing this
loop through all types
loop through array 1 and find the record of this type else, place null for array 1 var
loop through array 2 and find the record of this type else, place null for array 2 var
compare the temp variables
end loop
array comparison logic
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: array comparison logic
Look through the array functions to see if there is one that will do what you want first:
http://www.php.net/manual/en/ref.array.php
http://www.php.net/manual/en/ref.array.php
(#10850)