Is this possible?
php $variable = $variable1 || $variable2?
if $variable1 is empty use $variable2
Is there existing that is something like that?
PHP 5.3+:
$variable = $variable1 ?: $variable2;
PHP 5.2-:
$variable = $variable1 ? $variable1 : $variable2;
2.1m questions
2.1m answers
60 comments
57.0k users