how to nest if and else statement using ternary operator in PHP?
<p>am confused with using this ternary operator, i can easily get 1 level if and else
e.g</p>

<pre><code>($blah == $blah) ? blahblah : blahblahblah;
</code></pre>

<p>but what if the condition is like this?</p>

<pre><code>if($blah == blah1)
{ 
  echo $blah1;
}
else if($blah == blah2)
{
 echo $blah2;
}
else
{
 echo $blah;
}
</code></pre>

<p>how to convert this using ternary operator ?</p>
