Re: Re: If I have 2 arrays...

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

 



Jay Blanchard wrote:
[snip]
Close... I think array keys are preserved from the (original) first array, but other than that those appear to be the values that should intersect.
[/snip]

After a var_dump I am seeing that there is an extra space in each
element of one array, so no intersection occurs.

Well then there you have it... having an extra space means that the strings in the first array won't match the strings in the second array. Perhaps you can array_intersect(array_walk($array1, 'trim'), $array2)

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

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