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!
Split uses Regular Expressions, Explode uses pure strings.. If you don't need regular expression power, use Explode, it's much faster/less resource-using.. (Just as it says in the manual)
Thanks Stoker however for my next question.....
What is a regular expression?
Could you give me an example of a regular expression and an example of something which is not a regular expression? I'm finding it tricky to get my head round this.
A regular expression is used to match a pattern, so for example you might want to search for all instances of e-mail addresses - they're each going to be different (me@mydomain.com, you@yourdomain.net) but they follow a similar pattern. For this you would use a regular expression to match that pattern.
If, however, you wanted to find all instances of me@mydomain.com, then you wouldn't use a regular expression because it's the same string that you're searching for each time.