Results 1 to 3 of 3

Thread: Changing Dynamically Words in Text

  1. #1
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Changing Dynamically Words in Text

    Dear all,
    I need to change dynamically ###KEYWORD### in text with same word or phrase like in echo ($keyword);
    Text with ###KEYWORD### is dynamic content. It is displayed RSS feed.
    Can it be done..?
    Thank you

    <?php
    session_start();
    $_SESSION['raw_query'] = $_GET['q'];
    $_SESSION['ad_group'] = str_replace("-", " ", $_GET['q']);

    $keyword = $_SESSION["ad_group"];
    echo ($keyword);
    ?>

    <p>This is text, and ###KEYWORD### is word I wish to replace with same thing that is in "echo ($keyword);".</p>
    Last edited by young_coder; 06-21-2010 at 06:09 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,024
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Im not sure what you're trying to do - does this help?

    <p>This is text, and <?php echo $keyword; ?> is word I wish to replace with same thing that is in "echo ($keyword);".</p>

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    young_coder (06-21-2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I have tried to do str_replace on wrong place…
    Now it is OK... working...
    Thank you on help

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •