bilis_money Posted June 25, 2006 Share Posted June 25, 2006 hi,i want to insert a variable into html tag how?this is my previous attempt[code]<?phpecho "<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 Link to comment https://forums.phpfreaks.com/topic/12863-inserting-variable-into-tag/ Share on other sites More sharing options...
kenrbnsn Posted June 25, 2006 Share Posted June 25, 2006 That is fine. Why do you think it's incorrect?Ken Link to comment https://forums.phpfreaks.com/topic/12863-inserting-variable-into-tag/#findComment-49353 Share on other sites More sharing options...
lisa Posted June 25, 2006 Share Posted June 25, 2006 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. Link to comment https://forums.phpfreaks.com/topic/12863-inserting-variable-into-tag/#findComment-49354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.