1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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:
    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