cp_price 코드 가격비교에 넣고 싶어요.
본문
https://도메인/shop/price/naver.php
가격비교 불러가는 파일에서요.
g5_shop_coupon_table 테이블을 불러왔는데요.
그런데 중요한건 - 처리방법을 도저히 해봐도 모르겠습니다.
$row['it_price'] = ($row['it_cust_price']) ? $row['it_cust_price'] : $row['it_price'];
에다가 cp_price 를 it_price 에 마이너스 하고싶은데요. 혹시 방법 좀 알려주시면 안되나요?
답변 1
if ($row['it_cust_price']) {
$row['it_price'] = $row['it_cust_price'] - $row['it_price'];
}
echo $row['it_price'];
답변을 작성하시기 전에 로그인 해주세요.