title: What is the PHP shorthand for: print var if var exist
body: <p>We've all encountered it before, needing to print a variable in an input field but not knowing for sure whether the var is set, like this. Basically this is to avoid an e_warning.</p>
  
  <pre><code>&lt;input value='&lt;?php if(isset($var)){print($var);}; ?&gt;'&gt;
  </code></pre>
  
  <p>How can I write this shorter? I'm okay introducing a new function like this:</p>
  
  <pre><code>&lt;input value='&lt;?php printvar('myvar'); ?&gt;'&gt;
  </code></pre>
  
  <p>But I don't succeed in writing the printvar() function.</p>