Replacing 1 instance

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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?

Re: Replacing 1 instance

Tree*Rat escribió:
Quoted text here. Click to load it

Use a combination of substr_replace() and strpos().

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María:

Re: Replacing 1 instance

Quoted text here. Click to load it

got it thx

Site Timeline