开发者

What does it mean when I can't "use method return value in write context"?

When开发者_StackOverflow中文版 I use this statement if(count($this->input->post('p_id') =0)), I keep getting this error:

    Fatal error: Can't use method return value in write context in 
C:\xampp\htdocs\CI\professional_ci\application\models\MProducts.php  on line 249

But when I use if(count($this->input->post('p_id'))), it works. What does it mean I can't use method return?


In the first line you're trying to assign the value 0 to the function count. What you should use is == to test for equality.

if(count($this->input->post('p_id'))==0)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜