I have php script for selling deals. Currently, there are 2 requirements for deal; 1 is deal_value (original price) and special_value (discount price). So i have variables: deal_value, special_value, deal_percentage (which i already coded to get this discount percentage). These are inserted into database already.
So how do i show discount percentage label if the deal percentage > 0%?
FYI: i have this php html hot label already, so how do i code and display this hot_label if deal percentage > 0%?
Also, i need to echo the whole div= hot_label, which there is php inside and because there is css in this class=hot_label
<div class="hot_label">
<p>OFF</p>
<b><?php echo round($h->deal_percentage); ?>%</b>
</div>