'."\n"; } } ?>

: (working code and proof of concepts)

query->count != 0) { echo '

Results of your search for '.$query.' (Showing '.$data->query->count.' out of a possible '.$data->query->count.' matches)

'."\n"; echo '
    '."\n"; foreach ($data->query->results->photo as $item) { //check to make sure id is available - set default message if it is not if (strlen($item->id) < 2) { $id = 'No id available.'; } else { $id = $item->id; } //http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}.jpg echo '
  1. '.$item->title.'
    '.$item->title.'
    View in flickr
    View item details
    id: '.$id.'
    owner: '.$item->owner.'
    secret: '.$item->secret.'
  2. '."\n"; } echo '
'."\n"; echo '

Reset the page

'."\n"; } else { echo '

No results for '.$query.'.

'."\n"; echo '

Reset the page

'."\n"; } ?>