Solution :
PHP Code:
// query to get all pm for all users
$searchuser = $db->query_read("SELECT * FROM " . TABLE_PREFIX . " pmtext ORDER BY dateline DESC");
while ($result = $db->fetch_array($searchuser))
{
$touser = unserialize($result['touserarray']);
// loop pm array
foreach($touser AS $key => $item)
{
foreach($item AS $subkey => $subitem)
{
// username and userid inside array
$username = $subitem;
$userid = $subkey;
// here you can put your Condition (in my case i want show all pm for all users Except specific member)
// if user (mark) Send a multi-message to all of the John and Catherine and Michael
// and you want Review all pm Except pm ( to or from "John" )
// this Condition will be Review all PM (from or to) all users Except "John"
// Review pm from mark to Catherine AND pm from mark to Michael but not Review pm from mark to John Although it's the same message
if ( ($username != "John") || ($result['fromusername'] != "John") )
{
echo "from:" .$result[fromusername];
echo "to:" .$username;
echo "title:" .$result[title];
echo "text:" .$result[message];
echo "date:" .vbdate($vbulletin->options['dateformat'], $result['dateline'], true).".".vbdate($vbulletin->options['timeformat'], $result['dateline']).";
}
}
}
}