$description = 'Paper: ' . ($paperType == 'bond' ? 'Bond' : 'Other');
Try adding parentheses so the string is concatenated to a string in the right order.
More Related Contents:
- Stacking Multiple Ternary Operators in PHP
- How to write a PHP ternary operator [duplicate]
- PHP string concatenation [duplicate]
- What is ?: in PHP 5.3? [duplicate]
- Ternary operator left associativity [duplicate]
- How to concatenate multiple ternary operator in PHP? [duplicate]
- What does ? … : … do? [duplicate]
- Understanding nested PHP ternary operator [duplicate]
- PHP syntax question: What does the question mark and colon mean? [duplicate]
- C#’s null coalescing operator (??) in PHP
- PHP multiple ternary operator not working as expected
- Removing last comma from a foreach loop
- Group subarrays by one column, make comma-separated values from other column within groups
- Which coding style you use for ternary operator? [closed]
- Where can I read about conditionals done with “?” and “:” (colon)? [duplicate]
- Troubleshooting “Unexpected T_ECHO” in ternary operator statement
- Getting particular object
- How can I combine two strings together in PHP?
- How to add elements to an empty array in PHP?
- Example of how to use bind_result vs get_result
- PHP Regex to get youtube video ID?
- PHP to search within txt file and echo the whole line
- Get the date of next monday, tuesday, etc
- apc vs eaccelerator vs xcache
- Adding custom field to product category
- Getting Started with PHP Extension-Development [closed]
- Laravel Escaping All HTML in Blade Template
- How can I replace the deprecated set_magic_quotes_runtime in php?
- How can I block direct access to my JavaScript files?
- Dead code detection in PHP [closed]