Using list and each together, how to change the line after outputting one line?
梁雪雷
梁雪雷 2021-09-05 00:36:18
0
4
973

<?php$arr=array( 'Teaching Department'=>array( '), array('Zhang 1','21','demon'), ), 'Propaganda Department'=>array( array('Li 2','18','demon'), array('Gao 2','20','Male'),  array('Zhang 2','21','Yao Ren'), ), 'Finance Department'=>array( array('Li 3','18', 'Shemale'), array('High 3','20','Male'), array('Zhang','21','Monster'), ),);foreach($arr as $k=> ;$a){echo'<table width="500" border="1">'; >$e){ echo '< ;/table>'; }       ?>

梁雪雷
梁雪雷

reply all(2)
逆旅行人

QQ截图20210906095222.png

The output should be in this style

逆旅行人
foreach($arr as $k=>$a)
{    
        echo'';  
        echo $k ;                  
        foreach($a as $b=>$c){         
         echo "<tr>";                    
                foreach($c as $d=>$e){                                                  
                $i=list($one,$two,$three)=$e;                         
                echo ''.$i.'';  
         echo "</tr>";                                          
        }                         
                  
        }                      
        echo ''; 
}

Add

and

# at the beginning and end of the first layer of foreach. ##

  • reply Thank you, teacher
    梁雪雷 author 2021-09-06 09:43:21
  • reply It should be the second floor
    autoload author 2021-09-06 09:44:53
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template