0

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?

3 Answers 3

3

I believe what you are looking to do is something similar to the following.

<div id="divName"><?php echo($variable); ?> </div>
Sign up to request clarification or add additional context in comments.

Comments

1

<div><?php echo $variable; ?> </div>

Am I not understanding what you're trying to do or does that work?

Comments

0

You can also write like this:

     <?php echo "<div id='idName'> Hello World </div>"?>
     <?php echo "<b>This text is in bold.</b>"?>

1 Comment

b tags are deprecated by the way. This can also be done with much more simplicity.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.