Function mr_arrayValue
Returns value of an array key (assoziative or indexed).
Shortcut function for some ways to access to arrays:
// old way if (is_array($foo) && isset($foo['bar']) && $foo['bar'] == 'yieeha') { // do something } // new, more readable way: if (mr_arrayValue($foo, 'bar') == 'yieeha') { // do something } // old way if (is_array($foo) && isset($foo['bar'])) { $jep = $foo['bar']; } else { $jep = 'yummy'; } // new way $jep = mr_arrayValue($foo, 'bar', 'yummy');
Package: Plugin\ModRewrite
Copyright: www.polycoder.de
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Stefan Seifarth / stese
Author: Murat Purc <murat@purc.de>
Located at plugins/mod_rewrite/includes/functions.mod_rewrite.php
Copyright: www.polycoder.de
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Stefan Seifarth / stese
Author: Murat Purc <murat@purc.de>
Located at plugins/mod_rewrite/includes/functions.mod_rewrite.php
array |
$array |
The array |
mixed |
$key |
Position of an indexed array or key of an assoziative array |
mixed |
$default = NULL |
Default value to return |
mixed
|
Either the found value or the default value |