separating.

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
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

separating.

Post by cheatboy00 »

i know i knwo i am an idoit .... but i can seem to find out how to start this... i'm having a memory block...

anyway i have a $var and it contains different values like so...

$var = "stuff,i,we,world";

and as you can see each valuse is separated by a comma ... so i wanted to know how i can separate each of those values into an array....


stupid memory block.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

II. Array Functions -> explode->

Code: Select all

$var = "stuff,i,we,world";
$arr = explode(',', $var);
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

sweet thanks
Post Reply