To serialize an array you call the serialize() function. What serialize does is that it stores all the data, and information about the structure in 1 field. This field can then be stored.
After you retrieve the data, you can restore the original structure and data (an array in your case) with the unserialize() function.
PS Even when only storing the userid's, varchar(250) can be too small very fast.
|