Sure! I don't know if I went about it the right way, but its still sitting in my templates for my collectics blog, so here ya go...
ExampleJust the code; no outside formatting (so that it can be included easily into whatever formatting desired)
CKMJ6HGH0QV4 is my wishlist code.
CODE
<?
$titles = array(<MTGlueContainer><MTAmazon method="Wishlist" search="CKMJ6HGH0QV4" lastn="30">'<MTAmazonTitle encode_php="q">'<MTGlue>, </MTGlue></MTAmazon></MTGlueContainer>);
$links = array(<MTGlueContainer><MTAmazon method="Wishlist" search="CKMJ6HGH0QV4" lastn="30">'<MTAmazonLink>'<MTGlue>, </MTGlue></MTAmazon></MTGlueContainer>);
$images = array(<MTGlueContainer><MTAmazon method="Wishlist" search="CKMJ6HGH0QV4" lastn="30">'<MTAmazonSmallImage>'<MTGlue>, </MTGlue></MTAmazon></MTGlueContainer>);
$prices = array(<MTGlueContainer><MTAmazon method="Wishlist" search="CKMJ6HGH0QV4" lastn="30">'<MTAmazonSalePrice>'<MTGlue>, </MTGlue></MTAmazon></MTGlueContainer>);
$count = count($titles)-1;
$random = rand(0, $count);
$title = $titles[$random];
$link = $links[$random];
$image = $images[$random];
$price = $prices[$random];
echo "<div class=\"blogbody\">\n\r";
echo "<a href=\"", $link, "\/loveproductions\" target=\"_blank\">";
echo "<img src=\"", $image, "\" align=\"left\" border=\"0\"></a>\n\r";
echo "<span class=\"title\">", $title, "</span><br \>\n\r";
echo $price, "<br clear=\"all\" /></div>\n\r";
?>
Like I said, there's probably better ways to do this; I just made 4 arrays and picked the corresponding piece of data by using the same random number. Then echoed it out.
I used the MTAmazon plugin to get the data, and then the
Glue plugin to format the arrays - just easier that way, but not essential.
Hope that helps!
Kristine