<?php

// Simple function to remove duplicates by key search in multidimensional array
function keepFirstRemoveDuplicates($array,$key_search)
{

    $tracking_keywords = array();
    $sorted_products = array();

    foreach ($array as $key => $value) :

        $key_itself = $value[$key_search]; // = PC or MAC

        // Check if the key has already been used
        if(!in_array($key_itself,$tracking_keywords))
            $sorted_products[] = array( 'product' => $value['produkt'], 'type' => $value['type'] );

        // Insert all used key's to avoid duplicates in a new array
        $tracking_keywords[] = $key_itself;

    endforeach;

    return $sorted_products; // Returns an array

}

// The complete product list
$products = [
    ['produkt' => 'pc', 'type' => 'laptop1'],
    ['produkt' => 'pc', 'type' => 'stasjonær'],
    ['produkt' => 'pc', 'type' => 'laptop'],
    ['produkt' => 'pc', 'type' => 'screen'],
    ['produkt' => 'mac', 'type' => 'laptop1'],
    ['produkt' => 'mac', 'type' => 'laptop'],
    ['produkt' => 'mac', 'type' => 'screen']
];

// Sorted products
$sorted_products = keepFirstRemoveDuplicates($products,'produkt');

// Clean listing output
echo "<pre>";
print_r($sorted_products);
echo "</pre>";