how do i get images to display in a rows like this using php and css?

前端 未结 3 783
别跟我提以往
别跟我提以往 2021-01-23 11:15

i wanted to know how can i display the images like the on in the picture: i know that i have to retrive the images using a while loop, but then displaying them like this is the

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-23 11:44

    It's really not that hard, you just have PHP output the HTML of the table.

    Here's a quick example :

    $imagenum=0;
    echo "";
    while( $imagenum < $maximages){
      echo "";
      for ( $i = 0; $i < 4; $i += 1) {
        echo "";
        $image+=1;
      }
      echo "";
    }
    echo "
    "; if( $imagenum < $maximages){ echo ""; } echo "
    ";

提交回复
热议问题