Thanks for your example. The only information of value really that comes out of the array when you run unserialize is the userID and username. Do you now what those other numbers are for in that string?
I sent three test PM from my admin account to the three users to see how/if the touserarray values other than userID/username changes.
The only value that changes is the value before the username. In the first string it's 4, then 10 and finally 6. Do you know what that value is for? When I run unserialize it doesn't show up!
I need to know this when I import so that I can anticipate the correct value.
There is no real need to know what the numbers in that string mean. You should just populate an array, and then use $string = serialize($array) to get this string.
But if you want to know:
a:1:{s:2:"cc";a:1:{i:185;s:4:"Adam";}}
a:1:{..} - Array with 1 entry
s:2:"cc"; - String, 2 positions, value "cc"
a:1:{....} - Array with 1 entry
i:185; - Integer, value 185 (probably userid on this example)
s:4:"Adam"; - String, 4 positions, value "Adam"