webguync Posted April 6, 2009 Share Posted April 6, 2009 I need to add the result of the variable $CallNumber with the code below $count = 0; $CallNumber = 1; while($row = mysql_fetch_array($query)) { $currentID = $row['employee_id']; if($count == 0 || $currentID != $previousID) $CallNumber = 1; else $CallNumber++; echo 'the crazy number that starts over is: ' . $currentID; $previousID = $currentID; $count++; } within here <td></td> how would I do that? Quote Link to comment https://forums.phpfreaks.com/topic/152850-help-with-inserting-variable-within-tags/ Share on other sites More sharing options...
wildteen88 Posted April 6, 2009 Share Posted April 6, 2009 echo "<td>$CallNumber</td>"; Quote Link to comment https://forums.phpfreaks.com/topic/152850-help-with-inserting-variable-within-tags/#findComment-802686 Share on other sites More sharing options...
ambo Posted April 6, 2009 Share Posted April 6, 2009 Yeah thats or <td><?php echo"$callnumber"; ?></td> Quote Link to comment https://forums.phpfreaks.com/topic/152850-help-with-inserting-variable-within-tags/#findComment-802701 Share on other sites More sharing options...
wildteen88 Posted April 6, 2009 Share Posted April 6, 2009 Yeah thats or <td><?php echo"$callnumber"; ?></td> If all you're doing is echo'ing a variable quotes are not necessary Quote Link to comment https://forums.phpfreaks.com/topic/152850-help-with-inserting-variable-within-tags/#findComment-802704 Share on other sites More sharing options...
webguync Posted April 6, 2009 Author Share Posted April 6, 2009 got, it thanks. Quote Link to comment https://forums.phpfreaks.com/topic/152850-help-with-inserting-variable-within-tags/#findComment-802751 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.