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. 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. 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? 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. Link to comment https://forums.phpfreaks.com/topic/250960-need-help-with-syntax/#findComment-1292248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.