using php variables in html

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rudvee
Forum Newbie
Posts: 1
Joined: Tue Jul 06, 2004 10:52 pm

using php variables in html

Post by rudvee »

Hi...

I've written html code and included some php part in it to retrieve (some product information)from the database(mysql). I've the product info retrived into php variables. I don't know how to use these variables in the actual html code.

below is the html code. I want to use a php variable(say, $product) instead of "xxx" in the following code:
<em><img src="xxx" align="bottom" width="70" height="109"></em>

Any help is appreciated.
Thank you
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Code: Select all

<em><img src="<?php echo $product ?>" align="bottom" width="70" height="109"></em>
Post Reply