i am currently develop a simple IMAP client, when i call imap_getmailboxes() i receive a different values in attributes property of the mailbox object the problem is how can i manipulate these attributes to get a meaningful value,if you make a hard search to find a solution for this, you willnot find any useful documents for this problem, let us take a closer look for this problem.when i call imap_getmailboxes() against different IMAP servers i got these attribute values[attributes] => 9[attributes] => 1[attributes] => 64[attributes] => 32[attributes] => 40 the documentation tell us that we check this attributes against four constants, these contents areLATT_NOINFERIORS LATT_NOSELECT LATT_MARKEDLATT_UNMARKEDthe value of these constants are LATT_NOINFERIORS = 1LATT_NOSELECT = 2LATT_MARKED = 4LATT_UNMARKED = 8you can got this result by echo each constant, unfortunately the documentation not explain how we can check the attributes against the constants, after a long time of searching i find the answer in source code of c-client (you can get the source from ftp://ftp.cac.washington.edu/imap/)under \src\c-client you will find mail.h open it and you will find this /* terminal node in hierarchy */#define LATT_NOINFERIORS (long) 0x1 /* name can not be selected */#define LATT_NOSELECT (long) 0x2 /* changed since last accessed */#define LATT_MARKED (long) 0x4 /* accessed since last changed */#define LATT_UNMARKED (long) 0x8 /* name has referral to remote mailbox */#define LATT_REFERRAL (long) 0x10 /* has selectable inferiors */#define LATT_HASCHILDREN (long) 0x20 /* has no selectable inferiors */#define LATT_HASNOCHILDREN (long) 0x40as you notice here these are our four constants and three additional constants LATT_REFERRALLATT_HASCHILDRENLATT_HASNOCHILDRENthen what is the value of these 3 attributes LATT_REFERRAL 0x10 = 00010000 in binary, the bitmask value is 2^4 = 16 and so on, or simply echo this constant to get the value, thenLATT_REFERRAL = 16LATT_HASCHILDREN = 32LATT_HASNOCHILDREN = 64finally the full list of constants will beLATT_NOINFERIORS = 1LATT_NOSELECT = 2LATT_MARKED = 4LATT_UNMARKED = 8LATT_REFERRAL = 16LATT_HASCHILDREN = 32LATT_HASNOCHILDREN = 64ok let's back to our attributes [attributes] => 9[attributes] => 1[attributes] => 64[attributes] => 32[attributes] => 40 [attributes] => 9 this mean it's LATT_UNMARKED and LATT_NOINFERIORS 1+8 =9[attributes] => 1 this mean LATT_NOINFERIORS[attributes] => 64 this mean LATT_HASNOCHILDREN[attributes] => 32 this mean LATT_HASCHILDREN [attributes] => 40 this mean LATT_HASCHILDREN and LATT_UNMARKED 32+8=40this just like linux file permission 7 mean read, write, and execute 4+2+1 read=4 write=2 execute=1that is what i found, i hope this can help Mohamed AbbasNileweb Egypt