split should work fine... Just do something like:

$teamMembersArray = split(" ,;", $textarea);

That will give you an array of the team members.  Of course I'm assuming
that their names don't include spaces and that you'll separate them with
either a space, comma, or semi-colon.  And you'll want to get rid of any
newlines in $textarea as well.

-philip

On Thu, 1 Aug 2002, Hawk wrote:

> I'm trying to make a small script that I can use for randomizing teams and
> stuff, I have one field where I enter how many teams, one for how many in
> each team, and a <textarea> to write down all the players in. This is where
> my brain stopped working, first I was thinking about using split, but I
> don't know how when there isn't a predefined number of variables to split it
> into, how do I do this?
>
> and when I have separated them into variables, how do I put them into
> arrays?
> or maybe that's not a good way to do it? I don't know, and the heat in my
> room is killing me, can't think clearly :)
>
> Håkan
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to