search

Home  >  Q&A  >  body text

Please read what I wrote, is this right? ?

foreach( $arr as $k => $v ){
   echo '<h4>' .$k .'</h4>';
   echo'<table width="500" border="1">';
//    var_dump( $key );
   foreach( $v as $value  ){

       list($key , $value) = each( $v );
       echo '<tr>';
       foreach( $value as $vv ){

           echo '<td>'. $vv . '</td>';
       }

       echo '</tr>';
   };
   echo'</table>';

};

飞飞飞飞2677 days ago1985

reply all(7)I'll reply

  • 嘻嘻嘻

    嘻嘻嘻2020-04-29 08:35:40

    I always feel that everyone who can write such things is a very good person, and their thinking is quite clear, but I can't write it, my head is all blurred.

    reply
    0
  • 海挚

    海挚2019-01-25 22:01:03

    foreach( $arr as $k => $v ){

       echo '<h2 align="center">' .$k .'</h2>';//h4字体偏小,另外需要居中

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

       foreach( $v as $value  ){


           list($key , $value) = each( $v );

           echo '<tr style=text-align:center>';

           foreach( $value as $vv ){


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

           }


           echo '</tr>';

       };

       echo'</table>';


    };


    reply
    0
  • 凡衣

    凡衣2017-11-06 22:36:21

    sharp

    reply
    0
  • Gomez 、

    Gomez 、2017-08-17 15:38:44

    $color = ['#FFE4C4','#FF83FA','#FF4040','#FF00FF','#F5F5DC','#EEEE00','#E8E8E8','#DA70D6','#CDC9C9','#912CEE'];

    while(list($key,$value) = each($arr)){

        echo '<h2 style="width:800px;text-align:center;">' . $key . '</h2>' . '<table style="width:800px;border:1px solid gray;><tbody>';

        while(list($ke,$va) = each($value)){

            echo '<tr">';

            while(list($k,$v) = each($va)){

                echo '<td style="text-align:center;" bgcolor='. $color[rand(0,count($color)-1)] .'>' . $v . '</td>';

            }

            echo '</tr>';

        }

        echo '</tbody></table>';

    }


    reply
    1
  • 正念的奇迹

    正念的奇迹2017-08-02 11:39:14

    Any questions?

    reply
    1
  • ꧁༺Loser༻꧂

    ꧁༺Loser༻꧂2017-07-30 15:07:04

    Very good

    reply
    0
  • 大家讲道理

    大家讲道理2017-07-28 08:31:11

    There is no problem with the writing.

    reply
    0
  • 飞飞

    thanks, thanks

    飞飞 · 2017-07-28 09:25:04
  • Cancelreply