I have the following array:

```
Array
(
    [0] => Array
    (
        [hotelID] => 10
        [hotelcategoryID] => 12
        [hotelName] => Grand Forest Metsovo
        [hotelShortDescription] => 
        [hotelVisible] => 1
        [roomID] => 2
    )

    [1] => Array
    (
        [hotelID] => 10
        [hotelcategoryID] => 12
        [hotelName] => Grand Forest Metsovo
        [hotelShortDescription] => 
        [hotelVisible] => 1
        [roomID] => 3
    )

    [2] => Array
    (
        [hotelID] => 10
        [hotelcategoryID] => 12
        [hotelName] => Grand Forest Metsovo
        [hotelShortDescription] => 
        [hotelVisible] => 1
        [roomID] => 4
    )

    [3] => Array
    (
        [hotelID] => 14
        [hotelcategoryID] => 7
        [hotelName] => Hotel Metropolis
        [hotelShortDescription] => 
        [hotelVisible] => 1
        [roomID] => 23
    )

    [4] => Array
    (
        [hotelID] => 14
        [hotelcategoryID] => 7
        [hotelName] => Hotel Metropolis
        [hotelShortDescription] => 
        [hotelVisible] => 1
        [roomID] => 24
    )

)

```

I have two different hotelID keys. I would like to extract only one element (the first one) where the hotelID is unique in whole array. I am trying with following code:

```
$data['uniqueHotels'] = array_map('unserialize', array_unique(array_map('serialize', $hotels)));

```

but without any luck so far.

Anyone can give me a hint?