mercredi 27 mai 2015

Hide Rows That Contain A Certain String Using PHP and MySQL

I have this block of PHP code which is pulling its information from a database.

All I want to do is filter/hide the rows that has "Player" like "string".

    <?php
    while ($row = mysql_fetch_assoc($result))
    {
        echo "<tr>";

        echo "<td>";
        echo $row["player"];
        echo "</td>";

        echo "<td>";
        echo $row["by"];
        echo "</td>";

        echo "</tr>";
    }
    ?>

For example I would have a table below:

BEFORE

And I want it to look like the table below:

AFTER




Aucun commentaire:

Enregistrer un commentaire