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 Quote 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\" />"; ?> Quote 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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/131528-simple-variable-echo-issue/#findComment-683103 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.