I have one element of a project that is holding me back and try as I might I have not been able to get this to work. Can someone please assist me - I am sure I am just confused by it all and that there is an easy answer. I have 3 multi-dimensional arrays (3 different pricing data from different companies), EACH holding this sort of data:
[0] => Array
(
[itemcode] => 27663
[buy] => 50000
[perquantity] => 5
)
[1] => Array
(
[itemcode] => 38663
[buy] => 41000
[perquantity] => 4
)
The same itemcodes appear in the data from all 3 companies. I was to create an html table that has the following columns from this data:
ItemCode | Supplier1 | Supplier2 | Supplier3 | Difference (2nd lowest minus lowest)
38663 | 12500 | 12425 | 16440 | 75
My question: Is there a shortcut to doing this, say by creating another array to temp store data? Or is there a concept you feel is required to complete this easily?
Any help is VERY appreciated.