Question: I have tried several ways to close the dropdown but I cannot figure it out. 

```
<div class="collapse navbar-collapse" id="navbar-collapse">
    <ul class="nav navbar-nav">
        <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Dropdown<span class="caret"></span></a>
            <ul class="dropdown-menu" role='menu'>
                <li><a href="#section1">section1</a></li>
                <li><a href="#section2">section2</a></li>
                <li><a href="#section3">section3</a></li>
            </ul>
        </li>
    </ul>
</div>

```

css: 

```
.dropdown:hover .dropdown-menu {
display: block;
}

```

Answer: 
You could use `call_user_func_array()` in this case:

```
$new_array = array();
foreach($array as $values) {
    $new_array[] = call_user_func_array('array_merge', $values);
}

echo '<pre>';
print_r($new_array);

```

[Sample Output](http://codepad.viper-7.com/zwKo4n)
For this specific array you could use something like this:

```
$newArray = array();
foreach($array as $key => $arrayItem)
{
    $newArray[$key]['id'] = $arrayItem['Size']['id'];
    $newArray[$key]['name'] = $arrayItem['Size']['name'];
    $newArray[$key]['price'] = $arrayItem['Price']['price'];
}

```