Advertisement
Sheriziya

Dragon artist coding

Feb 10th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2. if ($dragon_breed != '')
  3. {
  4.     // First, let's see what $dragon_breed contains
  5. var_dump($dragon_breed);
  6.     echo "<BR>";
  7.     // That displayed the ID of the breed. Now let's get the name of the breed.
  8.     $breedid = $dragon_breed;
  9.     $breeddata = new Pod('breeds', $breedid);
  10.     echo 'Breed: ' . $breeddata->display('name') . "<BR>";
  11.     // Name of the breed is being displayed, now let's get the name of the artist with a simple display
  12.     echo 'Artist name: ' . $breeddata->display('artist') . "<BR>";
  13.     // With this result we can't get the artist link, so let's see if we can get the artist id instead. First, let's get the artist info in a different way.
  14.     $dragon_artist = $breeddata->get_field('artist');
  15.     var_dump($dragon_artist);
  16.     echo "<BR>";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement