The
mysql_fetch_array() function fetches a row from the result set as an associative array, a numeric array, or both. Returns an array generated based on the rows fetched from the result set, or false if there are no more rows.
<code><span>while</span>(<span>$rows</span><span>=</span>mysql_fetch_array(<span>$result</span>)){ <span>...</span><span>...</span><span>...</span><span>...</span><span>.</span> } 注意一定不要把<span>$rows</span><span>=</span>mysql_fetch_array(<span>$result</span>)写在<span>while</span>外面,如果这样写: </code>
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above has introduced the pitfalls that mysql_fetch_array is easy to fall into, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.