dragunu Posted December 31, 2006 Share Posted December 31, 2006 Hello all,how is it possible to if[code]$number = 80 ;[/code]then how can i possibly embed it in like <td align=enter><span class=style1>Number Found </span></td> ;i tried using htmlentities however, when i used it, the whole code in HTML code was printed out not the formatted html text.thanks again ,dragunu Link to comment https://forums.phpfreaks.com/topic/32385-solved-making-php-code-within-html/ Share on other sites More sharing options...
kenrbnsn Posted December 31, 2006 Share Posted December 31, 2006 If you're within the <?php ?> tags:[code]<?phpecho '<td align=enter><span class=style1>Number Found ' . $number . '</span></td>';?>[/code]If you're not within the <?php ?> tags:[code]<td align=enter><span class=style1>Number Found <?php echo $number ?></span></td>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/32385-solved-making-php-code-within-html/#findComment-150389 Share on other sites More sharing options...
dragunu Posted December 31, 2006 Author Share Posted December 31, 2006 thanks:) Link to comment https://forums.phpfreaks.com/topic/32385-solved-making-php-code-within-html/#findComment-150397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.