Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Amazon CD Cover php

    I am using a php album cover for my radio site. I have the vairable $song[0] to $song[10], how can i make it so $image[0] = $song[0], $image[1] = $song[1], etc.

    Thanks

    PHP Code:
    <title>Album</title>
    <style type="text/css">
    body {
        margin:0px; padding:0px;
        background:url('noalbum.jpg');
        }
    </style>
              <?php
    include('stats.php');

    error_reporting(0);

    $songtitle substr($song[0], 0"47"); 

    $new explode('-'$song[0]);

    require_once 
    'Zend/Service/Amazon.php';

    $amazon = new Zend_Service_Amazon('1786NSJ6HRKFHCY582R2','UK');

    $results $amazon->itemSearch(array(

        
    'SearchIndex' => 'Music',
        
        
    'Artist'  => "$new[0]",
        
        
    'ResponseGroup' => 'Medium'
        
    ));

     if (
    $results->totalResults() > 0) {
                
      foreach (
    $results as $result) {
                      if (isset(
    $result->LargeImage)) {
                          
    $image $result->LargeImage->Url->getUri();
                          }
      }
      } 
    ?>
    <img src="<?php echo $image;?>" width="75" height="75" />

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You can loop through the itemSearch code for each element in your $song array.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •