답변 2개 / 댓글 2개
채택된 답변
+20 포인트
판매가격 아래에 붙여 넣으시면 됩니다.
소수점까지 표시를 원하시면 round((1-(get_price($it)/$it['it_cust_price']))*100,0) // '0'을 조절하시면 됩니다.
Copy
<tr> <th scope="row">판매가격</th> <td> <?php echo display_price(get_price($it)); ?> <input type="hidden" id="it_price" value="<?php echo get_price($it); ?>"> </td> </tr> <tr> <th scope="row">할인율</th> <td> <?php echo round((1-(get_price($it)/$it['it_cust_price']))*100,0)."%"; ?> </td> </tr>
답변을 작성하려면 로그인이 필요합니다.