Reputation: 761
What I need to do is echo a PHP variable but It needs to be on the bottom of a certain DIV in my HTML page, not just the bottom of the page. Putting it in that DIV id should cover the formatting because that div is formatted using CSS.
Does anyone know how to do this?
Upvotes: 0
Views: 3026
Reputation: 416
You can also write like this:
<?php echo "<div id='idName'> Hello World </div>"?>
<?php echo "<b>This text is in bold.</b>"?>
Upvotes: 0
Reputation: 1084
<div><?php echo $variable; ?> </div>
Am I not understanding what you're trying to do or does that work?
Upvotes: 1
Reputation: 1259
I believe what you are looking to do is something similar to the following.
<div id="divName"><?php echo($variable); ?> </div>
Upvotes: 3