1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.
  2. Better Analytics for WordPress Get It Free

how do I remove ssi, htm and a character from a string variable

Discussion in 'PHP' started by t7584, May 7, 2006.

  1. #1
    1. how do I remove ssi, htm from a string variable

    2. 1. how do I remove a character from a string variable

    f.e $n="55^^77^7"
    remove all ^ from $n
    t7584, May 7, 2006 IP
  2. clancey

    clancey Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    In your limited example, use str_replace:

    $n = str_replace("^", "", $n);

    You can strip out HTML tags with strip_tags. For example:

    $n= '<p align="left"><font color="#33CC33">Get it</font></p>';
    $n = strip_tags( $n);
    echo $n, "\n";
    Code (markup):
    clancey, May 7, 2006 IP