title: PHP if first var is empty use second one
body: <p>I have so a little question if it possible to check with a variable if one of to var are not empty and to use their value? Like this:</p>
  
  <pre><code>$var1 = "";
  $var2 = "123";
  $varifnotempy= $var1 || $var2;
  
  echo $varifnotempy;
  </code></pre>
  
  <p>Here I want not <strong>2</strong> because he give me wich one is not empty but i want that he returns me <strong>123</strong> and if <code>$var1</code> is not null than to use the value of <code>$var1</code></p>
  
  <p>I know that I can use if else but I want to know if it possible to make it by variable. Thx.</p>