Advertisement
ghiwar

getdata _getdataxml

Mar 31st, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. function _getdataxml($item,$x = 0){
  2.     $asin       = $item['ASIN'];
  3.     $Title      = $item['Title'];
  4.     $Subtitle   = $item['Subtitle'];
  5.     $Price      = $item['Price'];
  6.     $SmallImageURL  = $item['SmallImageURL'];
  7.     $MediumImageURL = $item['MediumImageURL'];
  8.     $LargeImageURL  = $item['LargeImageURL'];
  9.     $Rating         = $item['Rating'];
  10.     $TotalReviews   = $item['TotalReviews'];
  11.     $category       = $item['category'];
  12.     $DetailPageURL  = $item['DetailPageURL'];
  13.     $binding        = isset($item['binding']) ? $item['binding'] : '';
  14.     $Published      = isset($item['Published']) ? $item['Published'] : '';
  15.     $authorNameList = isset($item['authorNameList']) ? $item['authorNameList'] : '';
  16.     $numPages       = isset($item['numPages']) ? $item['numPages'] : '';
  17.     $LowestPrice    = isset($item['LowestPrice']) ? $item['LowestPrice'] : '';
  18.     $TotalOffers    = isset($item['TotalOffers']) ? $item['TotalOffers'] : '';
  19.     $product[$x] = array('Asin' => $asin,
  20.                 'Title' => $Title,
  21.                 'Subtitle' => $Subtitle,
  22.                 'Price' => $Price,
  23.                 'SmallImageURL' => $SmallImageURL,
  24.                 'MediumImageURL' => $MediumImageURL,
  25.                 'LargeImageURL' => $LargeImageURL,
  26.                 'Rating' => $Rating,
  27.                 'TotalReviews' => $TotalReviews,
  28.                 'category' => $category,
  29.                 'DetailPageURL' => $DetailPageURL,
  30.                 'binding' => $binding,
  31.                 'Published' => $Published,
  32.                 'authorNameList' => $authorNameList,
  33.                 'numPages' => $numPages,
  34.                 'LowestPrice' => $LowestPrice,
  35.                 'TotalOffers' => $TotalOffers
  36.                 );
  37.     $result = array('Item' => $product);
  38.     return $result;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement