Good day. The question is simple, how do php tools perform checking vertically and horizontally in a single step (i.e. 1 cell from the top, bottom, right and left) in the html table that the script itself creates. For example:

<?php $start = microtime(true); set_time_limit(30); /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); date_default_timezone_set('Europe/Moscow'); echo "<table>"; echo "<tbody>"; echo "<tr>"; for ($i=1; $i <= 25; $i++) { echo "<td>1<td/>"; //тут должны быть некие вычисления вычисления if(($i % 5 == 0) && !($i == 25)) { echo "</tr>"; echo "<tr>"; } } echo "</tr>"; echo "</tbody>"; echo "</table>"; $time = microtime(true) - $start; echo 'Время выполнения скрипта: '.ceil($time).' сек.'; ?> 

It turns out a table of 5 to 5 c 1mi, and assume that each cell must be checked vertically and horizontally.

  • No, you just have a long line in the example; In general, draw a table on a piece of paper and understand how to get around it - Ghost
  • Yes, I also wanted to say the same, you do not have a table drawn there, but a row - Raz Galstyan
  • What to check? And what's the difference, check vertically and horizontally? - Kirill Korushkin
  • I use open server, not sandbox, on the page there is a table five by five, there is a question how to assume the value of the cell in the middle to check with the neighbors - Letisso

0