easy and quick PHP question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex79
    Confirmed User
    • Jun 2002
    • 996

    #1

    easy and quick PHP question

    i have 2 strings:
    string 1: "aaabbbccc"
    string 2: "bbb"

    what is the function to substract string 2 from string 1 and obtain a new string 3: "aaaccc" ??
  • nofx
    Too lazy to set a custom title
    • Nov 2002
    • 16826

    #2
    \n

    Often times I wonder why
    There's love and hate, theres live or die.
    When sickness comes I must decide:
    When feelings go, theres suicide.

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      $new_string = str_replace($string_to_remove,"",$original_string) ;
      Your post count means nothing.

      Comment

      • Nookster
        Confirmed IT Professional
        • Nov 2005
        • 3744

        #4
        Originally posted by psili
        $new_string = str_replace($string_to_remove,"",$original_string) ;
        what he said.
        The Best Affiliate Software, Ever.

        Comment

        Working...