'Delimiters'

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

'Delimiters'

Post by Jim »

How do I get information inside a set of delimiters I define?

explode() doesn't seem to work well because it doesn't understand that I'm looking for the information BETWEEN my | and |, and not direcly after.

So when I explode("|" , $doc), I get an array like this

Code: Select all

array(

[0] => text
[1] => //Nothing here because there's a space directly behind the second delimiter
[2] => text
[3] => //Another space

);
He'p is appreciated ;)
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

try using the split() function.
Post Reply