title: Echo foo based on if $bar is isset
body: <p>Normally when I retrieve an array from the database, I check to see if a certain element exists or is set to a certain value and echo text out accordingly:</p>
  
  <pre><code>if (isset($bar)) // or is true 
  {
    echo "something";
  }
  else  // elseif is set to false
  {
    echo "not something";
  }
  </code></pre>
  
  <p>But once you lots of variables, it can make your code quite an eyesore. I know you can easily create a function to do this, but does php provide an functionality built in to do this? What do fellow SOs do to get around this? </p>