unemployment Posted November 11, 2011 Share Posted November 11, 2011 '<img src="/img/blog/${blog_post->post_id}.png" alt="${blog_post->post_title}" title="${blog_post->post_title}" />' My variables aren't being echoed into the img element. Please help. Quote Link to comment https://forums.phpfreaks.com/topic/250960-need-help-with-syntax/ Share on other sites More sharing options...
trq Posted November 11, 2011 Share Posted November 11, 2011 The $ needs to be within the {} and variables are not interpolated when in a single quoted string. Quote Link to comment https://forums.phpfreaks.com/topic/250960-need-help-with-syntax/#findComment-1287481 Share on other sites More sharing options...
Pikachu2000 Posted November 11, 2011 Share Posted November 11, 2011 Do you expect variables to be interpolated when you have them in a single quoted string? Quote Link to comment https://forums.phpfreaks.com/topic/250960-need-help-with-syntax/#findComment-1287482 Share on other sites More sharing options...
unemployment Posted November 29, 2011 Author Share Posted November 29, 2011 Good catch, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/250960-need-help-with-syntax/#findComment-1292248 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.