You are here: php find differences in multi dimensional arrays « PHP Programming Language « IT news, forums, messages
php find differences in multi dimensional arrays

Posted by trpost on 11/03/06 17:56

I am looking for a way to find the differences between 2
multidimensional arrays. I have found ways to do this based on 1 key,
but I want to be able to look at differences based on all keys:

For example:

Array 1

[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION1"
["Category_Code"]=>
string(5) "WOR19"

[1]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION2"
["Category_Code"]=>
string(5) "WOR19"



Array 2

[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION1"
["Category_Code"]=>
string(5) "WOR19"

Resulting Array after identifying differences:

[0]=>
array(6) {
["Category"]=>
string(11) "WORKSTATION2"
["Category_Code"]=>
string(5) "WOR19"

So if any of the multidimentional array values are different, then
there isn't a match and the "record" is returned.

Thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация