There is a foreach()
. However such opeartion forces you to know the amounts of rows (3 in example) and the keys for each row ("userid", "username", "email").
foreach ($myArray as $theCurrentRow) {
echo "<td>" . $theCurrentRow["userid"] . "</td><td>" . $theCurrentRow["username"] . "</td><td>" . $theCurrentRow["email"] . "</td>";
}
Just wrap it in <table>
and <tr>
's and you have script that will automatically create a new row with, every, single, record.