note 106005 added to mysqli-result.fetch-assoc
| From: | sinthia at fireflowdesign dot com | Date: | Sun, 02 Oct 2011 04:14:47 +0000 |
| Subject: | note 106005 added to mysqli-result.fetch-assoc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183583@lists.php.net to get a copy of this message | ||
The style of the inline assignment statement:
while ($row = $result->fetch_assoc())
{//do something;}
Will generate a warning in Zend Studio.
I think in the interest on unambiguous code the example should read:
while (($row = $result->fetch_assoc())==TRUE)
{//do something;}
This style makes the intent clearer and does not irritate my lint program.
----
Server IP: 208.69.120.55
Probable Submitter: 67.83.14.136
----
Manual Page -- http://www.php.net/manual/en/mysqli-result.fetch-assoc.php
Edit -- https://master.php.net/note/edit/106005
Del: integrated -- https://master.php.net/note/delete/106005/integrated
Del: useless -- https://master.php.net/note/delete/106005/useless
Del: bad code -- https://master.php.net/note/delete/106005/bad+code
Del: spam -- https://master.php.net/note/delete/106005/spam
Del: non-english -- https://master.php.net/note/delete/106005/non-english
Del: in docs -- https://master.php.net/note/delete/106005/in+docs
Del: other reasons-- https://master.php.net/note/delete/106005
Reject -- https://master.php.net/note/reject/106005
Search -- https://master.php.net/manage/user-notes.php