title: Stacking Multiple Ternary Operators in PHP
body: <p>This is what I wrote :</p>
  
  <pre><code> $Myprovince = (
  ($province == 6) ? "city-1" :
  ($province == 7) ? "city-2" :
  ($province == 8) ? "city-3" :
  ($province == 30) ? "city-4" : "out of borders"
  );
  </code></pre>
  
  <p>But for every field I got the value <code>city-4</code>.  I want to use ternary operators instead of <code>switch/if</code> because I want to experiment and see how it would be done.</p>
  
  <p>What's the problem with this code?</p>