summaryrefslogtreecommitdiffstats
path: root/plugins/modifier.key_not_exists.php
blob: f29e07753c78c951280e2b02f410237d832dd256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

function smarty_modifier_key_not_exists($value, $key)
{
    if (!is_array($value)) {
        return array();
    }

    return array_filter($value,
        function($v) use ($key) {
            return !array_key_exists($key, $v);
        });
}

?>