Jump to content

[SOLVED] PHP do cmd not working


kyleldi

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.