stitchmedia Posted March 11, 2010 Share Posted March 11, 2010 Hi, I'm afraid I'm quite new to PHP so please go easy on me I have the following code in my page which helps me to parse BbCode from a database field: <?php include('bbcode.php'); $bbcode = new bbcode; $blogoutput = $row_Blogs['Content']; $bbcode->parse($blogoutput); ?> I then echo out the result further down the page with this code: <?php echo $bbcode->parse($blogoutput); ?> This line of code sits inside a repeat region that echo's out multiple divs with the content from each row. Now on a page without a repeat region this works fine but I cant get it to work with the repeat region, it just outputs the same record each time. I understand why its not working but unfortunately I lack the coding knowledge to rectify it. This is the code for the DIV the repeat region applies to: <form action="" method="get" name="BlogEntry"> <div id="blogbox"> <table width="100%" border="0"> <tr> <td width="63%" valign="middle"><h1><?php echo $row_Blogs['Title']; ?> <input name="BlogID" type="hidden" id="BlogID" value="<?php echo $row_Blogs['BlogID']; ?>" /> </h1> </td> <td width="37%" valign="middle"> <a href="editblog.php?BlogID=<?php echo $row_Blogs['BlogID']; ?>"><img src="images/edit.gif" alt="Edit Blog" border="0" align="middle" /></a> <input name="Delete" type="image" id="Delete" value="Delete" src="images/stddeletebutton.gif" align="middle" /></td> </tr> <tr> <td colspan="2"><span class="style1">Posted by <a href="userprofile.php?UserID=<?php echo $row_Blogs['UserID']; ?>"><?php echo $row_Blogs['Username']; ?></a> on <?php echo $row_Blogs['DateCreated']; ?></span></td> </tr> <tr> <td colspan="2" style="padding-top:5px;"><?php echo $bbcode->parse($blogoutput); ?></td> </tr> </table> </div> </form> <?php } while ($row_Blogs = mysql_fetch_assoc($Blogs)); ?> If you need any more info or more of the page code let me know. Thanks Dave Link to comment https://forums.phpfreaks.com/topic/194846-repeat-region-help-needed/ Share on other sites More sharing options...
sasa Posted March 11, 2010 Share Posted March 11, 2010 change line <td colspan="2" style="padding-top:5px;"><?php echo $bbcode->parse($blogoutput); ?></td> to <td colspan="2" style="padding-top:5px;"><?php echo $bbcode->parse($row_Blogs['Content']); ?></td> Link to comment https://forums.phpfreaks.com/topic/194846-repeat-region-help-needed/#findComment-1024655 Share on other sites More sharing options...
trq Posted March 11, 2010 Share Posted March 11, 2010 What the heck is a repeat region? Link to comment https://forums.phpfreaks.com/topic/194846-repeat-region-help-needed/#findComment-1024660 Share on other sites More sharing options...
stitchmedia Posted March 11, 2010 Author Share Posted March 11, 2010 What the heck is a repeat region? Excellent that seems to have sorted it Link to comment https://forums.phpfreaks.com/topic/194846-repeat-region-help-needed/#findComment-1024680 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.