search

Home  >  Q&A  >  body text

echo '</tr>'; Will the line breaks in the two outputs not be repeated? I tried it and deleting one can also output normally without any problem.

请问

<?php

echo '<table width="800" border="1">';

$i=0;while($i<10){    

echo '<tr>';$j=0;    

while($j<10){

echo '<td>'.$j.'</td>';        

$j ;    }  

echo '</tr>'; $i ;}

echo '</table>';

?>

手机用户1616724750手机用户16167247501123 days ago924

reply all(3)I'll reply

  • autoload

    autoload2021-12-30 16:16:39

    echo '<table width="800" border="1">';
    $i=0;   
    while($i<10){    
          echo '<tr>';
          $j=0;    
          while($j<10){
             echo '<td>'.$j.'</td>';        
             $j++;        
          }  
          echo '</tr>'; 
          $i++;
          }
    echo '</table>';

    <tr></tr> is a tag pair, a table tag in HTML

    reply
    0
  • 手机用户1616724750

    Oh, sorry, I didn't notice it, I always thought it was

    手机用户1616724750 · 2021-12-30 16:22:40
  • Cancelreply