title: how to show hide html table row based on php condition
body: <p>I want to show/hide table row based on status values of the fetched columns for mysql using php.</p>
  
  <p><strong>Working Code: This section is working fine</strong></p>
  
  <pre><code>while($row = mysql_fetch_array($sql))  
  {
  $name[] = $row['name'];
  $title[] = $row['title'];
  $prize[] = $row['prize'];
  $status[] = $row['status'];  // this  will save values as enabled or disabled
  $points[] = $row['points'];
  
  }
  
  
  &lt;?php 
  
        while($row = mysql_fetch_array($sql))  
  
  {
  
       echo "&lt;tr&gt; ";
       echo "&lt;td&gt;" .$row[name] . "&lt;/td&gt;";
      echo "&lt;td&gt;" .$row[points] . "&lt;/td&gt;";
          }
       echo "&lt;/tr&gt; " ;
  ?&gt;
  </code></pre>
  
  <p><strong>Problem: I need solution for this</strong></p>
  
  <p>I cant display the table as given above due to some more values, that will be taken from other tables, to be shown into the table rows. I am displaying the tables like this.</p>
  
  <pre><code>&lt;tr &gt;&lt;td&gt;&lt;?php echo "$title[0]";?&gt;&lt;/td&gt;&lt;td&gt;complete &lt;?php echo "$task[0]";?&gt; &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr &gt;&lt;td&gt;&lt;?php echo "$title[1]";?&gt;&lt;/td&gt;&lt;td&gt;complete &lt;?php echo "$task[1]";?&gt; &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <blockquote>
    <p>Kindly guide me how I hide or show the rows , as defined in problem
    section , using the value of</p>
    
    <p>$status[] = $row['status'];</p>
  </blockquote>
  
  <p>, which will be enabled or disabled</p>