No... ternary means three parts you need the condition, the true part, and the false part
You cannot build a ternary operator with only one expected result. Its simple Boolean logic, it just returns two values.
I would suggest you just stick with the first if/else statement you have. Besides using ternary operators can be harder to read in comparison to the standard if/else statements.
However since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.