I have this piece of code:
<?=!empty($options["placeholder"]) ? $options["placeholder"]:'search...'?>
I was under the impression I could do like:
<?=!empty($options["placeholder"]) ?:'search...'?>
But when $options["placeholder"]
is not empty then it returns 1, as it is a ternary operator.
Do I have to always issue the variable 2 times?