×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: sam russo
Added: Oct 31, 2015 10:18 AM
Views: 8
Tags: no tags
mysqli Loop thru query
  1.     $result = mysqli_query("SELECT id, name FROM mytable");
  2.     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
  3.         printf ("ID: %s  Name: %s", $row["id"], $row["name"]);
  4.     }
  5.  
  6.     mysqli_free_result($result)