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
anandkanatt
Forum Newbie
Posts: 3 Joined: Fri Aug 05, 2005 5:27 am
Location: Inside Apache
Contact:
Post
by anandkanatt » Tue Aug 30, 2005 3:02 pm
is there any way by which i can extract each word in a string which is separated by a comma??
eg. $string="a,b,c,d,e"
what i want is to extract a b c d e to separate variables??
raghavan20
DevNet Resident
Posts: 1451 Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:
Post
by raghavan20 » Tue Aug 30, 2005 3:08 pm
look at split and explode functions
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Aug 30, 2005 3:11 pm
be advised,
split() uses regular expressions, which means it will be slower than
explode() , and slower than
preg_split() as well.