title: IF statement inside variable and other IF statement
body: <p>I have this code:</p>
  
  <pre><code>while($s&lt;$nrpi)
  {
      if(${checkpart.$s}=="0") {
          $parts.="&lt;div&gt;".${part.$s}." = ".${price.$s}."&lt;/div&gt;";
      }    
      $s++;
  };
  </code></pre>
  
  <p>I want to include an IF statement for checking the <code>${price.$s}</code>.
  So if the variable has the value 0, i don't wan't to display the "=" sign, nor the variable, just <code>${part.$s}</code> inside div.
  <strong>I'm looking for the most compact solution</strong>, because in reality the code is much larger. Thanks!</p>