Page 1 of 1

Help with explode()

Posted: Thu Apr 10, 2003 12:04 pm
by Jim
I've looked through the manual for explode, and somehow can't get my mind around how to use explode().

I'm trying to use it in such a way as this: I want to edit everything between //Begin Edit and //End Edit and replace only the text between those tags.

Code: Select all

<-- Page Header -->

//Begin Edit

This is the content I want edited. When I'm finished editing this content, I want it to be put back between those tags and want to leave the rest of the page untouched.


//End Edit

<-- Page Footer -->
Of course, I'm open to using anything to denote the beginning and end of the content area. I just need a shove in the right direction with this one.

Thanks all!

Posted: Thu Apr 10, 2003 6:56 pm
by Jim
Am I just <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> people off with how I'm asking questions? No one seems to want to answer today. :P

Posted: Thu Apr 10, 2003 10:53 pm
by bionicdonkey
not sure explode is the right thing to be looking at.
i think what u need to do is to find the postion of the strings using strpos then copy the text between the positions using substring

hope this helps

Regards
donkey