title: Trying to output data as an array
body: <p>I made a table that holds post and likes and I'm trying to output the of everything in the table but I get the </p>
  
  <blockquote>
    <p>error: mysqli_num_rows() expects parameter 1 to be mysqli_result,
    boolean given on line 18.</p>
  </blockquote>
  
  <pre><code>$sql3 = "SELECT * FROM post;";
   $result = mysqli_query($conn,$sql3);
   $datas = array();
   if (mysqli_num_rows($result)&gt; 0){
       while($row = mysqli_fetch_assoc($result)){
           $datas[] = $row;
       }
   }
       foreach ($datas as $data){
           echo $data;
       }
  </code></pre>
  
  <p>I expect the all the information to be outputted, but the actual output is </p>
  
  <blockquote>
    <p>mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean
    given on line 18.</p>
  </blockquote>