Skip to content

Instantly share code, notes, and snippets.

@dypsilon
Created June 4, 2011 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dypsilon/1008477 to your computer and use it in GitHub Desktop.
Save dypsilon/1008477 to your computer and use it in GitHub Desktop.
The power of empty
if(!empty($someArray['firstKey']['secondKey']['thirdKey'])) {
echo $someArray['firstKey']['secondKey']['thirdKey'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment