title: Fetch rows using mysqli
body: <p>its a simple code. I want to keep a record in the database each time when a file is being  uploaded. And when each time any file is being uploaded I want the user to see he/her's  all uploaded files in a serial from the database. The record keeping while uploading file works fine. But the problem appears while fetching the table containing  all the uploaded file information. </p>
  
  <pre><code>//connetion code 
  $con = mysqli_connect("localhost", "root", "", "sss");
  
  if (mysqli_connect_errno()) 
  {
      printf("Connect failed: %s\n", mysqli_connect_error());
      exit();
  }
  
  //file upload code
  move_uploaded_file($_FILES["file"]["tmp_name"],"C:/xampp/htdocs/" . $_FILES["file"]["name"]);
  mysqli_query($con, "INSERT INTO uploads ( filename, uploaded_on) VALUES ( '{$_FILES['file']['name']}', NOW());");
  echo "Stored in: " . "C:/xampp/htdocs/" . $_FILES["file"]["name"];
  
  //fetch rows 
  $result =mysqli_query($con, "select * from uploads");
  
  while ($row = mysqli_fetch_array($result))
  {
      printf ("%s\n", $row);
  }
  
  mysqli_close($con);
  }
  </code></pre>
  
  <p>I can feel that there are some serious problem in coding. This is my first time working in mysqli, before I used to code using mysql. need help to know the actual problem and the solution. </p>
  
  <p><strong>Edited:</strong> 
  it returns this, </p>
  
  <pre><code>Notice: Array to string conversion in C:\xampp\htdocs\sss\upload_file.php on line 68
  Array
  
  Notice: Array to string conversion in C:\xampp\htdocs\sss\upload_file.php on line 68
  Array
  
  Notice: Array to string conversion in C:\xampp\htdocs\sss\upload_file.php on line 68
  Array
  </code></pre>
  
  <p>but unfortunately this code is a part of a huge code. so here line 68 is the line where the <code>$result = mysqli_query($con, "select * from uploads");</code> starts.</p>