Re: If I have 2 arrays...

From: Date: Thu, 16 Jun 2005 17:09:26 +0000
Subject: Re: If I have 2 arrays...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-217088@lists.php.net to get a copy of this message
Hello Jay, Thursday, June 16, 2005, 5:54:40 PM, you wrote: JB> ...shouldn't array_intersect($arr1, $arr2) return an array? Works perfectly for me (code below) PHP 4.3.11 <?php $array1 = array('ORIGTN', 'PSP_BILL1', 'PSP_BILL2', 'PSP_BILL3', 'PSP_CITY', 'PSP_STATE', 'PSP_ZIP', 'PSP_CONNECT', 'STATUS', '_0404', '_0405', '_0406', 'Total', 'Rate', 'Total Comp'); $array2 = array('PSP_BILL1', 'PSP_BILL3', 'PSP_CITY', 'PSP_STATE', 'PSP_ZIP', 'TOTAL COMP'); $array3 = array_intersect($array1, $array2); print_r($array1); print_r($array2); print_r($array3); ?> Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov

« previous php.general (#217088) next »