Comparing arrays, point me in the right direction please

TroyVE

New Member
So what im trying to do is compare bank transactions to orders in my database and if they match change the order status to confirmed.The transactions come in a xml format\[code\]$transaction->user-number //this is the social security number of the one who made the transaction$transaction->amount //this is the amount transfered\[/code\]I need to compare the user-number to the user-numbers associated with orders in my database.I could do that by making two arrays with those numbers and use \[code\]array_intersect\[/code\] to find the numbers that are present in both the database and in the transactions xml.Now i would have the user-numbers of the ones who have made a transaction but I still need to see if they transfered the correct amount.I will be able to finish this but I somehow feel that there is a simpler solution by using the user-number as the index in the array and the amount as the value and create two arrays like that and compare them.Can anyone help me here before I write some complicated, slow and messy code.Thanks
 
Top