获取值取决于url [关闭]

I have this array again:

    $predmeti = [
        'slo' => [
            'ime' => 'Slovenščina',
            'ucitelj' => 'Ana Berčon',
            'nadimek' => '',
            'ucilnica' => '11'
        ],
        'mat' => [
            'ime' => 'Matematika',
            'ucitelj' => 'Nevenka Kunšič',
            'nadimek' => '',
            'ucilnica' => '12'
        ],
        'ang' => [
            'ime' => 'Angleščina',
            'ucitelj' => 'Alenka Rozman',
            'nadimek' => 'Rozi',
            'ucilnica' => '3'
        ],

        'mob' => [
            'ime' => 'Medijsko oblikovanje',
            'ucitelj' => 'Iztok Mulej',
            'nadimek' => 'HTML ninja',
            'ucilnica' => 'MM2'
        ]
];

I want to get values of every key depend on url I am accesing. For example I have url /predmet?ime=slo, then I want to get data only for key 'slo'.

How do I achieve that?

if(isset($_GET['ime']) && isset($predmeti[$_GET['ime']])){
    $data = $predmeti[$_GET['ime']];
}

Use the parameter in the URL

<?php

$param = $_GET['ime'];
print_r($predmeti[$param]);

?>