Spliting a $string

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
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Spliting a $string

Post by oldtimer »

I want to pass along an option from a form like this

this-that-andthat.
Now on the next page i want to split these between the -s so that i have $this
$that
$andthat

I have read about it in the past but can not seem to find it.

Jerry
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

explode() is your friend
Post Reply