Hmm, I'm not sure I completely understand. But anyway, you could do something like this:
Code:
$msgs = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . " pmtext");
while ($check = $db->fetch_array($msgs))
{
if (($touser=@unserialize($check['touserarray'])) !== FALSE)
{
// check $touser[]
}
}
to be honest I don't know how to do the "check $touser[]" part. From your example it looks like $touser['cc'] would be an array of cc'd users, like (1=>admin, 8=>soso}. But does that mean the touserarray only contains the users who were cc'd? I don't know.