Question: Here is [my code](https://3v4l.org/VQ6Vk):

```
<?php

$arr1 = ['o' => 'vote', 'u' => 'true'];
$arr2 = ['p' => '', 'v' => 'digit'];

print_r(array_merge($arr1, $arr2));

/* Array
   (
       [o] => vote
       [u] => true
       [p] => 
       [v] => digit
   )

```

Always there is one item which has empty value. In example above, that item is `p`. Now I need to put that item as the last one. How can I do that? 

**Note:** I don't care about the order of other items. 

---

So this is expected result:

```
/* Array
   (
       [o] => vote
       [u] => true
       [v] => digit
       [p] => 
   )

```

Answer: 
One possible approach that preserves the order of non-empty elements would be:

```
$arr1 = ['o' => 'vote', 'u' => 'true'];
$arr2 = ['p' => '', 'v' => 'digit'];

$merged = $arr1 + $arr2;

$empty = array_filter($merged, function($var) {
    return $var == "";
});

$nonEmpty = array_diff_assoc($merged, $empty);

$sorted = $nonEmpty + $empty;

```
```
            usort($partner_names, function($a1, $b1) {
                return strcasecmp($a1['PARTNER_USERNAME'], $b1['PARTNER_USERNAME']);
            });

```

We should use strcasecmp for case insensitive strings