aebstract Posted November 5, 2008 Share Posted November 5, 2008 <?php echo "<img src=\"images/$pageT.jpg\" />"; ?> I have a variable "$page" set at the top of my file, need to put it in to this url with a capital T following the variable, just like the example shows. Right now it takes the "$pageT" right out of the link. Forgot how to do this Link to comment https://forums.phpfreaks.com/topic/131528-simple-variable-echo-issue/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 5, 2008 Share Posted November 5, 2008 <?php echo "<img src=\"images/{$page}T.jpg\" />"; ?> Link to comment https://forums.phpfreaks.com/topic/131528-simple-variable-echo-issue/#findComment-683096 Share on other sites More sharing options...
wildteen88 Posted November 5, 2008 Share Posted November 5, 2008 Wrap your variable in braces echo "<img src=\"images/{$page}T.jpg\" />"; Or do echo '<img src="images/'.$page.'T.jpg" />'; Edit: beaten to it Link to comment https://forums.phpfreaks.com/topic/131528-simple-variable-echo-issue/#findComment-683098 Share on other sites More sharing options...
aebstract Posted November 5, 2008 Author Share Posted November 5, 2008 =D thanks Link to comment https://forums.phpfreaks.com/topic/131528-simple-variable-echo-issue/#findComment-683103 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.