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? Quote 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> Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.