How to use a <?php echo urlencode($term);?> tag inside a php script

  php

I am trying to include a tag that works well all over the webpage but I need to figure out how to make it function inside a existing php script that is in the same page. Below is the example I am looking to make work. This way the rss feed will track the keywords that was used in the search automatically.

<?php

// output RSS feed to HTML

output_rss_feed('https://www.speedyfind.net/search/feed.php?Terms=<?php echo urlencode($term);?>', 6, true, true, 200);

?>

Source: Ask PHP

LEAVE A COMMENT