ok, Ive got my code to work, but its a big jerry-rig haha. because I am
using mtime() (the last two chars are allways 00) I substr the last two
chars off, array_insersect() them, then add 00 the the end of all the values
in the result array. dumb eh.

Chris Lee
Mediawaveonline.com



"Chris Lee" <[EMAIL PROTECTED]> wrote in message
94abie$j8q$[EMAIL PROTECTED]">news:94abie$j8q$[EMAIL PROTECTED]...
>
> 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]
>



-- 
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]

Reply via email to