funstein Posted September 24, 2010 Share Posted September 24, 2010 <?php $var = "http://www.google.com" ; ?> <iframe id="I1" name="I1" src= http://www.google.com style="width: 1186px; height: 1346px; float: middle"> Your browser does not support inline frames or is currently configured not to display inline frames. </iframe></div> Instead of the bold parts, I want the frame to show what $var links to, but as I have closed ?PHP, it will not return the link. Any help on how to make it go to $var? Link to comment https://forums.phpfreaks.com/topic/214303-use-php-variable-in-html/ Share on other sites More sharing options...
Psycho Posted September 24, 2010 Share Posted September 24, 2010 <?php $var = "http://www.google.com" ; ?> <iframe id="I1" name="I1" src="<?php echo $var; ?>" style="width: 1186px; height: 1346px; float: middle"> Your browser does not support inline frames or is currently configured not to display inline frames. </iframe></div> Link to comment https://forums.phpfreaks.com/topic/214303-use-php-variable-in-html/#findComment-1115208 Share on other sites More sharing options...
funstein Posted September 24, 2010 Author Share Posted September 24, 2010 Thanks, it worked! Link to comment https://forums.phpfreaks.com/topic/214303-use-php-variable-in-html/#findComment-1115212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.