-
-
Save jeyemwey/08aaf0d57fbd67c5a798 to your computer and use it in GitHub Desktop.
This little function returns the first argument if it's set in the main application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function p(&$var, $else = '') { | |
$var = (isset($var) && $var) ? $var : $else; | |
return $var; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment