View Full Version : AWS - artist name?

02-04-2004, 02:42 PM
What variable do I use to display the artist name of a CD?


02-04-2004, 03:19 PM
Is it Andrew Winston Spencer?

02-04-2004, 03:20 PM
Artist is found in the <Artist> node. Note that there may be more than one artist, so put your results in an array.

02-04-2004, 11:26 PM
GCT, how do I do that (using code from your tutorial for example)?

Thanks :)

02-05-2004, 12:08 AM
If you want to add a new attribute to your template using my tutorial-

1) Look at the XML file to see what the tag name is: <Artist>

2) In your .php file, find the big elseif statement within the for loop, add a new line containing the new tag, and name the variable accordingly:
elseif($d_ar[$j]['tag'] == 'Artist'){$Artist[] = $d_ar[$j]['value'];}See how $Artist is an array? I did that because, if you examine the XML file, you can see there could potentially be more than one artist assigned to a CD. (Why? I don't know.)

3) Echo back the value(s) of $Artist in your template:
foreach($Artist as $janetsNipple){
echo $janetsNipple;

02-05-2004, 02:19 AM
Ahhh - thanks :) That's a great explanation! :)