Personally, I find this to be cleaner:
$cl = sprintf 'color:%s;', $c_diff <= 0 ? $color_good : $color_bad;
In reply to Re: concat string with ternary operator
by BrowserUk
in thread concat string with ternary operator
by odrevet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |