String separating and arrays

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
Ruski
Forum Commoner
Posts: 28
Joined: Thu May 26, 2005 3:45 am

String separating and arrays

Post by Ruski »

Hi,
Im trying to find a method of separating strings such as:

1,5,13,42

or

4,2,1

and add the values of the numbers to an array

Any ideas of how I would go about doing this

Thanks
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: String separating and arrays

Post by Chris Corbyn »

Ruski wrote:Hi,
Im trying to find a method of separating strings such as:

1,5,13,42

or

4,2,1

and add the values of the numbers to an array

Any ideas of how I would go about doing this

Thanks
*yawn*

explode()
Ruski
Forum Commoner
Posts: 28
Joined: Thu May 26, 2005 3:45 am

Post by Ruski »

thanks, that was a bit too easy
Post Reply