3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sub = ['a', 'b', 'c']; echo "<table class='table'><thead><tr>"; for($j = 0; $j < count($sub); $j++){ echo "<th scope='col'>" . $sub[$j] . "</th>"; } echo "</tr></thead></table>";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.62 ms | 1941 KiB | 9 Q