array_diff weirdness


Posted on 16th Feb 2014 01:33 pm by admin

I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_values($diff); //reindex array to remove empties
//output to $discrepancy
print_r($diff);
exit;

Both $pids and $pidlist contain exactly the same value; so I would have expected that value not to appear in $diff - but it is. Both $pids and $pidlist contain a few thousand values, and I've only found this one example which appears in both lists as well as $diff.

Can anybody shed any light?

No comments posted yet

Your Answer:

Login to answer
216 Like 23 Dislike
Previous forums Next forums
Other forums

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Movado réplica , Luxo Movado Watches, Falso Movado Watches, Mens Movado , Ladies Movado relógios para venda
[b][url=http://www.anywatchesbuy.com/pt/]réplica relógios suíços aaa +[/url][/b] [b][url

Pandora Charms Outlet Sale | Pandora Outlet Jewelry Store | Pandora Kralen in de uitverkoop | Pandora Outlet Online, Pandora sieraden Charms Outlet Sale, Pandora sieraden Outlet Online bespaart 70%
[b][url=http://nl.cheap-pandora.top/]pandora outlet online[/url][/b] [b][url=http://www.cheap-pandor

PHP switch function help
Hi, I am trying to create a search function for a directory website. On the search function on html

rolex - klockor
[b]rolex - klockor[/b] [b][url=http://www.rolexmens.top/sv/]rolex[/url][/b] [b][url=http://www.rolex

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Google+ Indyaspeak @ Pinterest RSS