Replacing 1 instance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tree*Rat

    Replacing 1 instance

    I am using TinyMCE as a editor to add content to site. I needed to split
    the post into 2 parts. I decided to use the "page break" tab in TinyMCE to
    do this.
    As the user can add mutliple page breaks I need to remove all but the
    first, but str_replace() removes all instances so how can I remove all but
    the first?
  • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

    #2
    Re: Replacing 1 instance

    Tree*Rat escribió:
    I am using TinyMCE as a editor to add content to site. I needed to split
    the post into 2 parts. I decided to use the "page break" tab in TinyMCE to
    do this.
    As the user can add mutliple page breaks I need to remove all but the
    first, but str_replace() removes all instances so how can I remove all but
    the first?
    Use a combination of substr_replace( ) and strpos().


    --
    -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    -- Mi sitio sobre programación web: http://bits.demogracia.com
    -- Mi web de humor al baño María: http://www.demogracia.com
    --

    Comment

    • Tree*Rat

      #3
      Re: Replacing 1 instance

      "Álvaro G. Vicario" <alvaroNOSPAMTH ANKS@demogracia .comwrote in
      news:geuji0$d60 $2@huron.algoma s.org:
      Use a combination of substr_replace( ) and strpos().
      >
      got it thx

      Comment

      Working...