convert string into an array

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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

convert string into an array

Post by pelegk2 »

i have a string like :
1,3,6,7,43,

and i wantto convert it into an array
how can i do that?
thnaks in advance
peleg
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

Post by mcog_esteban »

use the explode function.

ex: $arr = explode(",",$string);
Post Reply