怎么在php中使用this关键字-创新互联
今天就跟大家聊聊有关怎么在php中使用this关键字,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

下面定义了一个Cart类
items[$artnr] += $num;
}
// 把 $num 个 $artnr 从车中取出
function remove_item ($artnr, $num)
{
if ($this->items[$artnr] > $num) {
$this->items[$artnr] -= $num;
return true;
} else {
return false;
}
}
}
?>看完上述内容,你们对怎么在php中使用this关键字有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注创新互联行业资讯频道,感谢大家的支持。
当前题目:怎么在php中使用this关键字-创新互联
分享路径:http://jxruijie.cn/article/pogjp.html
