selwynorren Posted December 17, 2010 Report Posted December 17, 2010 Hi All, I am pretty much stumped at the moment of something, I need the php clever guys to please help I have two results from a query, they both contain icao codes Result 1: FAJS, FACT, FABL, FAWB Result 2: FAJS, FAVS, FAWB, FANS I want to be able to compare these two results and echo out the icao code each time there is a match i.e Result 3: FAJS, FAWB I know I can use something like: if (result 1 = result 2) to make a comparison, but how do out output what that comparison would be? I hope this question makes sense Quote
Administrators Nabeel Posted December 17, 2010 Administrators Report Posted December 17, 2010 Put them into an array, then use: http://us.php.net/manual/en/function.array-intersect.php Quote
selwynorren Posted December 17, 2010 Author Report Posted December 17, 2010 Thanks Nabeel Now its a start for me, now to write a whole load of conditions Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.