Also @CrocoDillon, shouldn’t it be $title = $trakt->movie->title ? $trakt->movie->title : $trakt->show->title ? $trakt->show->title : "None"; Not sure if that’s right though. I never saw the operator with the ? and the : right next to eachother.
What if `$trakt->movie->title` evaluates to a string and `$trakt->show->title` is NOT empty? In the code you posted in the first post, `$title` would still equal `$trakt->movie->title`.
CrocoDillon’s code above follows a cascade of `$trakt->movie->title`, `$trakt->show->title`, `”None”`, taking whichever first evaluates to true. The difference between his code and yours in the first post is that values of `””` and `”0″` will evaluate to false, while your original code would have allowed `$title` to equal that.
@ChrisBurton, what do you want to happen if both are empty? Or both not empty? If that never happens I see no reason using `?:` wouldn’t work, unless like @BenWalker said you want `””` and `”0″` to be valid titles.