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

WBOY
Release: 2016-07-25 08:52:55
Original
1124 people have browsed it
  • }
  • //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. ?>


  • source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template