In order to have Polish language spell checking In PhpStorm you must generate .dic file with words.

You can do that using linux command:

aspell --lang pl dump master | aspell --lang pl expand | tr ' ' '\n' > polish.dic

You can also download this file generated by me, by clicking: Polish PhpStorm dictionary

Next you go to settings, for single project or you can also set it as default (default setting wouldn’t apply to old procjects). Type in search “Spelling” change tab to “Dictionaries”, click + button to add folder where generated dictionary is placed. Apply. If not working, try to reboot PhpStorm.

How to search key value pair in multidimensional array? In other words search for subset of multidimensional, multilevel array by key and value pair.

This is solution to this problem, notice that in $arr[1] there is multidimensional array, and is also returned in output of search.

<?php

$arr = array(
    0 => array(
        'id' => 0,
        'name' => "cat 1"
    ),
    1 => array(
            array(
                'id' => 1,
                'name' => "cat 1"
            )
    )
,
    2 => array(
        'id' => 2,
        'name' => "cat 2"
    )
);

$arrIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr));

foreach ($arrIterator as $arrIteratorItem) {

    $subArray = $arrIterator->getSubIterator();

    if (isset($subArray['name']) && $subArray['name'] === 'cat 1') {
        $outputArray[] = iterator_to_array($subArray);
    }
}

print_r($outputArray);

output of print_r :

Array
(
    [0] => Array
        (
            [id] => 0
            [name] => cat 1
        )

    [1] => Array
        (
            [id] => 1
            [name] => cat 1
        )

)

BTW as you can see in first code snippet, it do not include closing ?> tag. As you can know closing PHP tag is optional. And if do not necessary you can and should not include it. This is because after closing PHP tag there could be empty white space character that will make problems with sessions. Ie. “headers already send” type of errors.

Sources: