Skip to content

Instantly share code, notes, and snippets.

@suziewong
Created December 25, 2012 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suziewong/4371646 to your computer and use it in GitHub Desktop.
Save suziewong/4371646 to your computer and use it in GitHub Desktop.
mysql_fetch_array() 与mysql_fetch_row()区别?

mysql_fetch_array()返回根据从结果集取得的行生成的数组,如果没有更多行,返回false除了将数据以字段做索引外,还可以用字段名作为索引。

mysql_fetch_row() 返回从结果集中取得一行作为枚举数组,返回一个数字索引的数组,偏移量从0开始。

mysql_fetch_array() 是mysql_fetch_row()的扩展版本。 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment