Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php check undefined offset

// $key = 10, if $array does not have $array[10] set, it will return false
// If $array[10] has any value, it will return true
if(array_key_exists($key, $array)){}
 
PREVIOUS NEXT
Tagged: #php #check #undefined #offset
ADD COMMENT
Topic
Name
9+2 =