Re: how to compare value between 2 arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



weetat wrote:
Hi all,

 I am using php 4.3.2 in Red hat enterprise.
 Have some issue which need some advice from php experts here.

 I need to compare value between 2 arrays .
 The arrays data are populated by data from the database resultset.
 The database resultset fields are the same type and name.

 for example ,
   serial_no is PK field.

in resultset 1 , have field serial_no = '123456' country = 'England' and city = 'London' in resultset 2 , have field serial_no = '123456' country = 'England' and city = 'Manchester

   As you can see , the city value is different between the 2 resultset.
So i will update status fields in the resultset 1 to 'Update'.If the same is 'New' ,and so on.

http://www.php.net/array_diff will do it for you.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux