Home > Backend Development > PHP Tutorial > Two ways to display horizontal repeating areas in php_PHP tutorial

Two ways to display horizontal repeating areas in php_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:49:31
Original
958 people have browsed it

Method 1. Note that there is a predefined picture record set rsmpic. The pictures to be repeated horizontally are pictures. Please change the name of your record set according to your situation. Neatly put the horizontally repeated content in a table
< table width="100" border="0" align="center" cellpadding="5" cellspacing="5">
$numberColumns = '3';
$numrows = '3';
while(($numrows <> 0) AND (! $rsmpic->EOF))
{
$startrw = $endrw + 1;
$endrw = $endrw + $numberColumns;?>

< ?PHP While (($startrw <= $endrw) AND (!$rsmpic->EOF)) { //Start repeating content?>







$startrw = $startrw + 1;
$rsmpic->MoveNext();}//The above repeats td content?>

Wend; }
Method 2. Drag the repeat mark outside the (vertical repetition is outside the ), and add a variable, Add 1 for each repetition, if %3 is equal to 0 echo a "" . Please look carefully





"; ?>




.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319540.htmlTechArticleMethod 1. Note that there is a predefined picture record set rsmpic. The pictures you want to repeat horizontally are the pictures. Please follow your Change the situation to your recordset name. Neatly place the horizontal repeating content...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template