Reputation: 2374
I'm getting this syntax error and I know it's PHP 101, but I wouldn't know php if it hit me over the head with a curly bracket. Any help would be appreciated. Thanks
<?php echo ($this->getProduct()->getCategory() ? $this->getProduct()->getCategory()->getName() : ‘no category’) ?>
Upvotes: 0
Views: 3244
Reputation: 19220
What kind of apostrophe is that?
‘no category’
Should be
'no category'
Upvotes: 6