title: PHP - Pricing Tables - Price is FREE
body: <p>i have Price tables with monthly and yearly costs but i need a price table there is for free access. If i set the Price to Zero i get an error coz the code cant read the zero price. Below the code snippet. thanks</p>
  
  <pre><code>&lt;?php foreach ($Packages-&gt;getDataAs("Package") as $p): ?&gt;
                      &lt;div class="price"&gt;
                          &lt;div class="price-content"&gt;
                              &lt;div class="main-price"&gt;
                                  &lt;h1&gt;&lt;?= format_price($p-&gt;get("monthly_price")) ?&gt;&lt;/h1&gt;
                                  &lt;p&gt;&lt;?= htmlchars($Settings-&gt;get("data.currency")) ?&gt;/&lt;?= __("per month") ?&gt;&lt;/p&gt;
                              &lt;/div&gt;
  
                              &lt;p class="special-discount"&gt;
                                  &lt;?php
                                      $total = 12 * $p-&gt;get("monthly_price");
                                      $dif = $total - $p-&gt;get("annual_price");
                                      $save = $dif * 100 / $total;
  
                                      if ($save &gt; 0) {
                                          echo __("Save %s when paid annualy", format_price($dif) . " " . htmlchars($Settings-&gt;get("data.currency")));
                                      }
                                  ?&gt;
                              &lt;/p&gt;
  </code></pre>