amazon_create_teaserlist
Generates a short teaser-list as an HTML-table.
amazon_create_teaserlist(array xmlresult [, int noofitems [, int link [, int align] [, int title]]])
This function returns a short teaserlist-table which you can use to link to amazon as well as to a script that contains detailed information on the product. Before you run this function you first have to run a search function like amazon_search(). The array you receive with this function is the xmlresult you need to run amazon_create_teaserlist(). Optional parameters are the noofitems which will be replied (1-10, 5 is default), the align of the table (right, left or center) and a short title. With the parameter link you can define a URL as a link for each item. To improve the use of this function in cooperation with other scripts, the flag "&ASIN=" will be added and will contain the ASIN of the selected product. If you leave this field blank, there will be a directly link to amazon™.
Example 1. Returns a teaser-table with books by "Tom Clancy":
$Author="Tom Clancy"; $Data=amazon_search_author($Author); $HTMLTable=amazon_create_teaserlist($Data); echo $HTMLTable; |
|
Example 2. Returns a teaser-table with books by "Tom Clancy" and the title "Books by Tom Clancy":
$Author="Tom Clancy"; $Data=amazon_search_author($Author); $HTMLTable=amazon_create_teaserlist($Data,5,"","left","Books by Tom Clancy"); echo $HTMLTable; |
|