Welcome Guest, Not a member yet? Register   Sign In
array helper - element()
#1

Moving to 3.0 I found that the function element() doesn't check if the 2nd parameter is an array as in the 2.0, giving error.
better to change in:

function element($item, $array, $default = NULL)
{
return is_array($array) ? (array_key_exists($item, $array) ? $array[$item] : $default) : $default;
}
Reply


Messages In This Thread
array helper - element() - by ghibellino - 06-18-2015, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB