Guest User

Untitled

a guest
Apr 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. function my_set_retailers( $gratisid, $gprice, $gurl, $amazonid, $aprice, $aurl, $clibroid, $cprice, $curl, $ebookid, $eprice, $eurl, $fnacid, $fprice, $furl, $kindleid, $kprice, $kurl ) {
  3. $retailers = array();
  4.  
  5. if( !empty( $gratisid ) ) {
  6. $retailers[] = array("id" => $gratisid, "product_price" => $gprice, "product_url" => $gurl);
  7. }
  8.  
  9. if( !empty( $amazonid ) ) {
  10. $retailers[] = array("id" => $amazonid, "product_price" => $aprice, "product_url" => $aurl);
  11. }
  12.  
  13. if( !empty( $clibroid ) ) {
  14. $retailers[] = array("id" => $clibroid, "product_price" => $cprice, "product_url" => $curl);
  15. }
  16.  
  17. if( !empty( $ebookid ) ) {
  18. $retailers[] = array("id" => $ebookid, "product_price" => $eprice, "product_url" => $eurl);
  19. }
  20.  
  21. if( !empty( $fnacid ) ) {
  22. $retailers[] = array("id" => $fnacid, "product_price" => $fprice, "product_url" => $furl);
  23. }
  24.  
  25. if( !empty( $kindleid ) ) {
  26. $retailers[] = array("id" => $kindleid, "product_price" => $kprice, "product_url" => $kurl);
  27. }
  28.  
  29. return serialize( $retailers );
  30. }
  31.  
  32. function my_divide()
  33. {
  34. return "|";
  35. }
  36. ?>
Add Comment
Please, Sign In to add comment