Singular or Plural setting to a variable. PHP
问题 There are a lot of questions explaining how to echo a singular or plural variable, but none answer my question as to how one sets a variable to contain said singular or plural value. I would have thought it would work as follows: $bottom="You have favourited <strong>$count</strong> " . $count == 1 ? 'user':'users'; This however does not work. Can someone advise how I achieve the above? 回答1: This will solve your issue, thanks to mario and Ternary operator and string concatenation quirk?