Home  >  Article  >  Backend Development  >  The difference between the usage of mysql_fetch_row() and mysql_fetch_array()

The difference between the usage of mysql_fetch_row() and mysql_fetch_array()

WBOY
WBOYOriginal
2016-07-25 08:52:551076browse
  • }
  • //Close the connection to the database
  • mysqli_free_result($result);
  • mysqli_close($mysqli);*/
  • ?>
  • Copy code
    1. //Connect to the local mysql database, select test as the operation library
    2. $mysqli = mysqli_connect("localhost", "root", "","test", 3306);
    3. // Use the mysql_query function to read data from the user table
    4. $result = mysqli_query($mysqli, "SELECT * FROM userinfo");
    5. while($row = mysqli_fetch_array($result))//Read the data content through a loop
    6. {
    7. ?>


  • Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn