Look up the serialize() function.
Serialize, turns arrays into a string representation of their array form, and use unserialize() to turn the string back into the original array form.
for example:
$arr = array(
1 => 'one',
2 => 'two',
3 => 'three' );
$ser_str = serialize($arr);
// Now you can put it into the db, or whatever
// Remember if you're putting it into a db, don't forget to addslashes() the var, else you will have problems
$original = unserialize($ser_str);
hope I helped.