passing function values to another function in same class
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to pass function values to another function in the same class, like to store some values in a variable and then call this variable in another function in the same class. Here is my Code public function ven_coupon() { if ($_POST) { $number = $_POST['coupon']; $query = $this->front->ven_coupon($number); if (count($query) <= 0 ) { echo "Not Valid"; } $payment = $this->cart->total(); $dis = $query['discount']; $name = $query['username']; $number = $query['number']; $discount['discount'] = ($payment*$dis)/100; $discount['data'] = $dis;