kyleldi Posted March 10, 2009 Share Posted March 10, 2009 I've got a repeat region set up to repeat this db query, yet it fails on do {, Any idea what i'm missing? <?php if(isset($_GET['id'])){ echo '<h1 class="style5">'.ucwords($row_rs_newsfeed['headline']).'<br /> <span class="newsubheading">Posted: '.ucwords($row_rs_newsfeed['date']).' @ '.$row_rs_newsfeed['time'].'</span></h1> <div class="fullarticle"><p>'.$row_rs_newsfeed['abstract'].'</p></div>'; } else{ echo '<h1 class="style5">News Archives<br /> <span class="newsubheading">Keeping you up to date with Laser Dynamics</span></h1> do { <div class="newsrelay"> <h3>'.ucwords($row_rs_newsfeed['headline']).'</h3> <p>'.substr($row_rs_newsfeed['abstract'], 0,150).'... <a href="news.php?article='.$row_rs_newsfeed['id'].'">Read More</a></p> </div> <div class="addinfo">Total News Articles To Date: '.$totalRows_rs_newsfeed.'</div>'; } while($row_rs_newsfeed = mysql_fetch_assoc($rs_newsfeed)); ?> Link to comment https://forums.phpfreaks.com/topic/148868-solved-php-do-cmd-not-working/ Share on other sites More sharing options...
kenrbnsn Posted March 10, 2009 Share Posted March 10, 2009 The "do" is in the middle of your "echo". Re-think what you're doing. Ken Link to comment https://forums.phpfreaks.com/topic/148868-solved-php-do-cmd-not-working/#findComment-781700 Share on other sites More sharing options...
defeated Posted March 10, 2009 Share Posted March 10, 2009 Try this... have not tested it so it may be rubbish... but I think it's good. echo "<h1 class='style5'>News Archives<br />" ; echo "<span class='newsubheading'>Keeping you up to date with Laser Dynamics</span></h1>" ; do { echo "<div class='newsrelay'> <h3>".ucwords($row_rs_newsfeed['headline'])."</h3> <p>".substr($row_rs_newsfeed['abstract'], 0,150)."... <a href='news.php?article=".$row_rs_newsfeed['id']."'>Read More</a></p> </div> <div class='addinfo'>Total News Articles To Date: ".$totalRows_rs_newsfeed."</div>"; } while($row_rs_newsfeed = mysql_fetch_assoc($rs_newsfeed)); .... and what Ken said Link to comment https://forums.phpfreaks.com/topic/148868-solved-php-do-cmd-not-working/#findComment-781701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.