Re: table row breaks, need help
| From: | R. Kurniawan | Date: | Mon, 30 Oct 2000 11:26:47 +0000 |
| Subject: | Re: table row breaks, need help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22657@lists.php.net to get a copy of this message | ||
remove the echo from the loop,
store the result into an array... e.g $style[$i]=$myrow["styleNumber"];
don't forget to init the $i before while loop
simply loop the echo using the array...
e.g
for ($i=$start;$i<=$end;$i++) {
echo "blablabla";
}
In essence what I'm doing is separating the code from the presentation!
At 03:55 PM 10/26/2000 -0700, you wrote:
How would I get this code to make a new row after displaying 4-5 images (and possibly only display 16-20 per page before ending and offering a next/previous link when necessary) __________________________________________ while($myrow = mysql_fetch_array($result)) {At your service R. Kurniawan Web Developer - www.rileks.com http://www.brainbench.com/transcript.jsp?pid=1782592$style = $myrow["styleNumber"]; $name = $myrow["name"]; $type = $myrow["type"]; $birthMonth = $myrow["birthMonth"]; $birthDay = $myrow["birthDay"]; $birthYear = $myrow["birthYear"]; $birthTime = $myrow["birthTime"]; $amPm = $myrow["amPm"]; $birthCity = $myrow["birthCity"]; $birthState = $myrow["birthState"]; $url = $myrow["url"];echo "<td align=center><a href=".$url.$style.".jpg><imgsrc=".$url.$style."-t.jpg border=0 alt=\"$style $name $type\"></a><br><b>".$name." ".$type."</b></td>"; } echo "</tr></table></div>"; ___________________________________________Jerry Lake - jerryl@europa.comWeb Designer Europa Communications - http://www.europa.comPacifier Online - http://www.pacifier.com-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net