Jump to content

Archived

This topic is now archived and is closed to further replies.

bilis_money

inserting variable into tag?

Recommended Posts

hi,

i want to insert a variable into html tag how?
this is my previous attempt

[code]
<?php
echo "<img src=$filename />";
?>
[/code]

I guess the src=$filename is wrong.
What is the right way to insert a variable inside a html tag?

thanks in advance

Share this post


Link to post
Share on other sites
That is fine. Why do you think it's incorrect?

Ken

Share this post


Link to post
Share on other sites
I'm new to PHP so I could be wrong about this ....but I'm pretty sure that the extension on your html file has to be .php. If you leave it as .html it's not going to work.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.