Filzhut.net Filzhut.net amazon_functions for PHP (Version 0.9)
Making the work with Amazon.com™ Web Services Version 1.0 much easier

amazon_browsenodes

Returns an array of a modes' valid browsenodes

amazon_browsenodes(str mode)

This function returns an associative array with the valid amazon™ browsenodes of a mode as keys and their common names as value (f.e. "1000" as key and "Book Bestsellers" as value). You can get the valid amazon™ modes with the function amazon_modes().

Example 1. Get browsenodes of the mode "books", sort and display them:

$Browsenodes=amazon_browsenodes("books");
asort($Browsenodes);
while(list($Key,$Value)=each($Browsenodes)) {
  echo "<a href='displaycategory.php?browsenode=$Key'>$Value</a>\n";
 }

Will return:

<a href='displaycategory.php?browsenode=2'>Biographies</a>
<a href='displaycategory.php?browsenode=3'>Business</a>
<a href='displaycategory.php?browsenode=4'>Childrens</a>
<a href='displaycategory.php?browsenode=5'>Computers/Internet</a>
<a href='displaycategory.php?browsenode=6'>Cooking</a>
<a href='displaycategory.php?browsenode=13643'>Engineering</a>
<a href='displaycategory.php?browsenode=86'>Entertainment</a>
<a href='displaycategory.php?browsenode=10'>Health</a>
<a href='displaycategory.php?browsenode=9'>History</a>
<a href='displaycategory.php?browsenode=48'>Home/Garden</a>
<a href='displaycategory.php?browsenode=10777'>Law</a>
<a href='displaycategory.php?browsenode=17'>Literature/Fiction</a>
<a href='displaycategory.php?browsenode=18'>Mystery</a>
<a href='displaycategory.php?browsenode=53'>Nonfiction</a>
<a href='displaycategory.php?browsenode=21'>Reference</a>
<a href='displaycategory.php?browsenode=22'>Religion</a>
<a href='displaycategory.php?browsenode=23'>Romance</a>
<a href='displaycategory.php?browsenode=25'>SciFi/Fantasy</a>
<a href='displaycategory.php?browsenode=75'>Science</a>
<a href='displaycategory.php?browsenode=26'>Sports</a>
<a href='displaycategory.php?browsenode=173507'>Technical</a>
<a href='displaycategory.php?browsenode=1000'>Top Selling</a>
<a href='displaycategory.php?browsenode=27'>Travel</a>


© by Filzhut.net, Daniel Filzhut 2002