Skip to content

Instantly share code, notes, and snippets.

@AlbinoDrought
Created November 24, 2016 17:31
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 AlbinoDrought/05fa0017f9a1c62fb79e9dd82b168dac to your computer and use it in GitHub Desktop.
Save AlbinoDrought/05fa0017f9a1c62fb79e9dd82b168dac to your computer and use it in GitHub Desktop.
<?php
/*
with all the esoteric functions PHP has, you would think they would also have something like this:
*/
function ifset($array, $key, $ifnotset = null) {
if(isset($array[$key])) return $array[$key];
return $ifnotset;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment