function idx($array, $key, $default)Arcanist Technical Documentation ()
function idx($array, $key, $default)
Arcanist Technical Documentation ()
Access an array index, retrieving the value stored there if it exists or a default if it does not. This function allows you to concisely access an index which may or may not exist without raising a warning.
Parameters
array | $array | Array to access. |
scalar | $key | Index to access in the array. |
wild | $default | Default value to return if the key is not present in the array. |
Return
wild | If `$array[$key]` exists, that value is returned. If not, $default is returned without raising a warning. |
- Defined
- src/utils/utils.php:36