I am (confused).

I know this should be a very simple thing to do, but I just cant figure the logistics out of how to do it. That and I KNOW it is sitting there staring at me.

Here;s the deal, When a user submits a form it will either have a single entry in a certain field, or multiple entries separated by "," in it. I need a routine that will take the entry and return either a list of the entries and how many there are, OR the single entry.


i get this: "thing1"

and then the routine returns $things witht the value "thing1".

But if i get this: "thing1, thing2, thing3"

the routine returns this:

$things[0] = thing1
$things[1] = thing2
$things[2] = thing3

How do i do this?