echo "<script>console.log(\"".sizeOf($status)."\");</script>";
This array has a size of 228.
Within this array there is nome
, status1
, status2
, status3
, status4
. (5 columns).
I wanted to print them in tabular form.
if($status[$i]['numStatus'] == 1){
echo "<tr>";
echo "<td>".$status[$i]['Nome']."</td>";
echo "<td>" . $status[$i]['status'] . "</td>".PHP_EOL;
} else if($status[$i]['numStatus'] == 2) {
echo "<td>" . $status[$i]['status'] . "</td>".PHP_EOL;
} else if($status[$i]['numStatus'] == 3){
echo "<td>" . $status[$i]['status'] . "</td>".PHP_EOL;
} else if ($status[$i]['numStatus'] == 4){
echo "<td>" . $status[$i]['status'] . "</td>".PHP_EOL;
echo "</tr>".PHP_EOL;
}
I did it that way, but I think there's a better way, do not you?