Help with explode()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Help with explode()

Post 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!
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Post 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
bionicdonkey
Forum Contributor
Posts: 132
Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:

Post 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
Post Reply