jhulott Posted November 19, 2009 Share Posted November 19, 2009 I am trying to display a result on a wordpress site including a Rss feed url with a variable called "productkeyword". The "productkeyword" is a custom field in Wordpress. Right now I have this : $keyword=<?php echo get_post_meta($post->ID,'productkeyword',true); ?> <?php echo SimplePieWP('http://www.tights4.me.uk/products/feed/rss/?s=$keyword');?> But it is not quite right and I'm stumped Any one got any ideas what I have done wrong? Thanks Jason Link to comment https://forums.phpfreaks.com/topic/182118-solved-adding-keyword-string-into-url/ Share on other sites More sharing options...
joel24 Posted November 19, 2009 Share Posted November 19, 2009 you need to use " instead of ' php only parses variables inside double quotes. i.e. <?php echo SimplePieWP("http://www.tights4.me.uk/products/feed/rss/?s=$keyword");?> Link to comment https://forums.phpfreaks.com/topic/182118-solved-adding-keyword-string-into-url/#findComment-960813 Share on other sites More sharing options...
jhulott Posted November 19, 2009 Author Share Posted November 19, 2009 Thanks Joel, That's done it! Jason Link to comment https://forums.phpfreaks.com/topic/182118-solved-adding-keyword-string-into-url/#findComment-960814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.