Filzhut.net amazon_functions for PHP (Version 0.9)amazon_modes
Returns an array of the valid amazon modes
amazon_modes()
This function needs no vars and simply returns an associative array with the valid amazon™ mode names as key and their common names as value (f.e. "universal" as key and "Tools & Hardware" as value). You will need these modes f.e. for the function amazon_search_manufacturer().
Example 1. Get modes, sort and display them:
$Modes=amazon_modes();
asort($Modes);
while(list($Key,$Value)=each($Modes)) {
echo "<a href='displaymode.php?mode=$Key'>$Value</a>\n";
}
|
<a href='displaymode.php?mode=baby'>Baby</a> <a href='displaymode.php?mode=books'>Books</a> <a href='displaymode.php?mode=photo'>Camera & Photo</a> <a href='displaymode.php?mode=classical'>Classical Music</a> <a href='displaymode.php?mode=videogames'>Computer & Video Games</a> <a href='displaymode.php?mode=pc-hardware'>Computers</a> <a href='displaymode.php?mode=dvd'>DVD</a> <a href='displaymode.php?mode=electronics'>Electronics</a> <a href='displaymode.php?mode=kitchen'>Kitchen & Housewares</a> <a href='displaymode.php?mode=magazines'>Magazines</a> <a href='displaymode.php?mode=garden'>Outdoor Living</a> <a href='displaymode.php?mode=music'>Popular Music</a> <a href='displaymode.php?mode=software'>Software</a> <a href='displaymode.php?mode=universal'>Tools & Hardware</a> <a href='displaymode.php?mode=toys'>Toys & Games</a> <a href='displaymode.php?mode=vhs'>Video</a> |