I have a repeat region question. What I’m trying to do here is repeat information from a query until it runs out. I have it the limit set at 5. I want the information to repeat but have the DIV id change as it repeats. Is this at all possible? What I’m trying to create here is a featured jquery slider and to do so I need what is being displayed to pull on of these into the mainbox as it slides through or is clicked on. Thanks in advance.
<?php
$idname = "fragment-";
$idnum = 1;
echo $idname . $idnum;
?>
<?php do { ?>
<div id="<?php for($idnum=1;$idnum<=5;$idnum++){
echo $idname . $idnum++; break;}?>" class="ui-tabs-panel" style="">
<img src="<?php echo $row_getDisplay['picture']; ?>" alt="" />
<div class="info" >
<h2><a href="fetch?id=<?php echo $row_getDisplay['post_id']; ?>" ><?php echo $row_getDisplay['title']; ?></a></h2>
<p><?php echo $row_getDisplay['preview']; ?><a href="fetch?id=<?php echo $row_getDisplay['post_id']; ?>" >Click Here</a></p> </div>
</div>
<?php } while ($row_getDisplay = mysql_fetch_assoc($getDisplay)); ?>
This is the current output of the code..
<div id="fragment-1" class="ui-tabs-panel" style="">
<img src="images/archives/2012/july/1343579505.jpg" alt="" />
<div class="info" >
<h2><a href="fetch?id=39" >Testing Preview Box Character Count max out on the total number</a></h2>
<p>Other things have to go here to show the preview seems like other things don't really fit<a href="fetch?id=39" >Click Here</a></p> </div>
</div>
1 Answer