title: Display row that is not repeated linking with database
body: <p>I am new in php. I make a quiz app and I want to show questions that is not repeated again . here's my code.
  Please help me to show require result.</p>
  
  <pre><code>&lt;?php
  include('connect.php');
  $sql = "SELECT * FROM quiz_question WHERE theme_id= 2 ORDER BY RAND ()";
  $result = $conn-&gt;query($sql);
    if ($result-&gt;num_rows &gt; 0) {
     // output data of each row
     while($row = $result-&gt;fetch_assoc()) {
       $id =  $row['id'];
  
         echo "
         &lt;h2&gt;" . $row["question"]. "&lt;/h2&gt;";
         break;
  
       }
     }
     $check_id = array ($row['id']);
     echo $check_id['0'];
       if(array ($row['id']) == $check_id){
         echo "no question ";
       }
       else{
         echo "
         &lt;h2&gt;" . $row["question"]. "&lt;/h2&gt;";
       }
  ?&gt;
  </code></pre>