Closed Thread
Results 1 to 2 of 2

Thread: Remove a text

  1. #1
    Junior Member binladun is an unknown quantity at this point
    Join Date
    Aug 2002
    Posts
    9

    Smile Remove a text

    Hi !

    I have this text
    Code:
    <?php
    $text =<<<EOF
    <FORM>
    <input type=text name=name value="%name%">
    <input type=text name=age value="%age%">
    <input type=text name=email value="%email%">
    </FORM>
    EOF;
    ?>
    I'm looking for the PHP code that can loop thru the $text and remove the any string start with %xxxx%

    Thanks for your help again.

  2. #2
    Pro Member hohoho is an unknown quantity at this point hohoho's Avatar
    Join Date
    Apr 2002
    Location
    localhost
    Posts
    456
    $text = eregi_replace("\%(.*)\%", "", $text);
    There are 3 kinds of people: the ones who can count and the others who cannot

Closed Thread

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