Ok I thought array_intersect() was the function I was looking for, I might
have to write my own.
I want an array with ONLY the keys/values that are present in all the
variables; ie.
<?
$test_a[] = '974806802083190501';
$test_a[] = '974806802083190503';
$test_a[] = '974806802083190504';
$test_b[] = '974806802083190501';
$new_array = array_intersect($test_a, $test_b);
print_r($new_array);
?>
Array
(
[0] => 974806802083190501
[1] => 974806802083190503
[2] => 974806802083190504
)
<?
$test_a[] = '501';
$test_a[] = '503';
$test_a[] = '504';
$test_b[] = '501';
$new_array = array_intersect($test_a, $test_b);
print_r($new_array);
?>
Array
(
[0] => 501
)
array_insersect() only seems to work with small numbers... or small text.
Chris Lee
Mediawaveonline.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]