Php STRING replace

Discussion in 'PHP' started by mojo142, Dec 10, 2009.

  1. mojo142

    mojo142 New Member

    Joined:
    Dec 10, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    I want to make a php page and i am having trouble in making that. i want to make a page where i will have a php files with some html code and i want to replace that specific one string in that code which could be 123456 with 546321 when it load by

    for this i found this way something like page.php?id=546321

    So this thing make easy for me just replacing the id and making a new page.

    How to do so or any tut for ths.
     
  2. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    http://zontek.zzl.org
    PHP:
    <?php

    $id 
    $_GET['id'];
    echo 
    $id;

    ?>
    save this as page.php according to your example
    and pass that argument
    (srry if any erroor check for the first line i w juz writting form the memory)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice