While writing up the next part (yes, I was planning to get around to that), I have discovered a critical error in the implementation above. Please do not use this method until I have resolved it.
For those who like helping to solve problems, here's the problem:
Code:
[1] => Arts & Photography
[2] => Audiocassettes
[4] => Audio CDs
[8] => Audio Downloads
[16] => Bargain Books
[32] => Biographies & Memoirs
[64] => Business & Investing
[128] => Children's Books
[256] => Christian Books
[512] => Comics & Graphic Novels
[1024] => Computers & Internet
[2048] => Cooking, Food & Wine
[4096] => e-Books
[8192] => Entertainment
[16384] => Espaņol
[32768] => Gay & Lesbian
[65536] => Health, Mind & Body
[131072] => History
[262144] => History
[524288] => Horror
[1048576] => Literature & Fiction
[2097152] => Mystery & Thrillers
[4194304] => Nonfiction
[8388608] => Outdoors & Nature
[16777216] => Parenting & Families
[33554432] => Professional & Technical
[67108864] => Reference
[134217728] => Religion & Spirituality
[268435456] => Romance
[536870912] => Science
[1073741824] => Science Fiction & Fantasy
[-2147483648] => Sports
[0] => Women's Fiction If you can look at that and see the problem, then nothing more needs to be said. If you can't see the problem, then you probably can't help (no offense).