It really depends on what you mean. If, for example, you want to be able to turn it back into an array easily, use serialize() and then unserialize() .. the output isn't much to look at, but it allows you to easily pass arrays as form input, for example. However, read the comments on PHP.net about it: php.net/serialize .. if you don't want PHP to be able to read it again, you can write it to a variable by using foreach() and appending each value to the end of a string one at a time.