How to show images or data in bottom to top in a table in php
I have more than 30 images and and i am getting them in a loop,Currently i am showing 7 images in a row but i want like this that after first 7 images which开发者_运维知识库 are shown in row the next seven will be shown in its above row and the next seven in it its above row in a table.i want to do it dynamically in php.
I would say rather than printing the images in order, put them in a buffer and don't print them until all three are loaded. Rather than:
<?
for ($i=1; $row_of_images[$i]; $i++) {
echo $row_of_images[$i];
}
?>
or whatever you have, do
<?
for ($i=1; $row_of_images[$i]; $i++) {
$images = $row_of_images[$i] + $images;
}
echo $images;
?>
If you want the images to actually load in that order (i.e. load the last row, then the middle, then the top) as they come, then you'll have to use CSS to change the top
property of each row. The value for the top
depends on the CSS position
; set it to absolute
and you can just set each row to 200, 100, and 0 (or however much space you need for each row). This will also only work with block elements, not <table>
's and <tr>
's.
精彩评论