Question: I have 2 arrays : 

1. $valid\_sku\_array
2. $qb\_sku\_array

I want to `intersect` them, and print out the `bad` one (diff)

Then I do this : 

```
        // Case Sensitive
        $intersect_sku_array_s = array_intersect( $valid_sku_array, $qb_sku_array );

       dd($intersect_sku_array_s); ... array (size=17238) 

```

Then I also tried with the Case Insensitive by doing this : 

```
    // Case Insensitive
    $intersect_sku_array_is = array_intersect(array_map('strtolower', $valid_sku_array), array_map('strtolower', $qb_sku_array ));

    dd($intersect_sku_array_is); ... array (size=18795)  

```

As you can see the diff of both array = 18795 - 17238 = 1557.
I want to see what are they. Then I tried this : 

`$diff = array_diff( $intersect_sku_array_is , $intersect_sku_array_s );`

and when do `dd($diff);` I got `array (size=18795)`

I just couldn't figure it out how to get to print out those **1557**.

Can someone please explain what is going on here ?

Answer: 
You're problem already begins with your intersect call! There you will lose your "real" array data, because you compare everything in lowercase and assign it also in lowercase.

So your array\_diff won't find anything, because it's case sensitive and if you make it case insensitive you still doesn't have the real data.

You already have to change your intersect. So your code should look something like this:

```
$intersect_sku_array_s = array_intersect($valid_sku_array, $qb_sku_array);
$intersect_sku_array_is = array_uintersect($valid_sku_array, $qb_sku_array, "strcasecmp");
                        //^^^^^^^^^^^^^^^^ See here I used 'array_uintersect' with 'strcasecmp', so that you don't lose your case

```

After this you can do your array\_diff normal like this:

```
$diff = array_diff($intersect_sku_array_is, $intersect_sku_array_s);

```
I'm not familiar with `dd` as a PHP function.

Your question is not entirely clear, but if you are just trying to look at the contents of the array `$diff` there are many ways to do it...

```
echo "diff=<pre>".print_r($diff,true)."</pre><br />\n";

```

-or-

```
var_dump($diff);

```

-or-

```
foreach ($diff as $k=>$v)
    echo "k=$k, v=$v<br />\n";

```

Is that what you are trying to do?