title: How to check for variable existence in codeigniter(php)? newb question
body: <p>Hey I'm new to php and codeigniter.  I know that in codeigniter's view you can echo a variable like</p>
  
  <pre><code>&lt;?php echo $var ?&gt;
  </code></pre>
  
  <p>but if say, I don't pass the variable $var, I get a nasty </p>
  
  <pre><code>&lt;h4&gt;A PHP Error was encountered&lt;/h4&gt;
  </code></pre>
  
  <p>in my html source code.  I've worked with django before an in their template, if the variable doesn't exist, they simply don't render it.  Is there a way in php/codeigniter to say 'if $var exists do smthing else do nothing' ?</p>
  
  <p>I tried:</p>
  
  <pre><code>&lt;?php if($title): ?&gt;
      &lt;?php echo $title ?&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>but that was an error.  Thanks!</p>