Jump to content

do while


dee19802000

Recommended Posts

hey,

 

what am i doing wrong with this do while loop that i have looping info i want to email

$message.= do { "<tr>
          <td align=\"left\" valign=\"top\">". $code ."</td>
          <td align=\"left\" valign=\"top\">". $desc ."</td>
          <td align=\"center\" valign=\"top\">". $colour ."</td>
          <td align=\"center\" valign=\"top\">". $size ."</td>
          <td align=\"center\" valign=\"top\">". $price ."</td>
          <td align=\"center\" valign=\"top\">". $unit ."</td>
        </tr>" } while ($row_quotes = mysql_fetch_assoc($quotes));

 

Dee

 

Link to comment
https://forums.phpfreaks.com/topic/189864-do-while/
Share on other sites

The statement will result a syntax error. Do the following:

 

do { 
       $message .= "<tr>
          <td align=\"left\" valign=\"top\">". $code ."</td>
          <td align=\"left\" valign=\"top\">". $desc ."</td>
          <td align=\"center\" valign=\"top\">". $colour ."</td>
          <td align=\"center\" valign=\"top\">". $size ."</td>
          <td align=\"center\" valign=\"top\">". $price ."</td>
          <td align=\"center\" valign=\"top\">". $unit ."</td>
        </tr>"; 
} while ($row_quotes = mysql_fetch_assoc($quotes));

 

Hope this will help.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/189864-do-while/#findComment-1001853
Share on other sites

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.