I've a series of custom fields attached to certain pages. These fields are named slide1, slide2, side3, slide4, slide5, slide6.
These are images which are going to be used as a slideshow (I'm using jflow slider for this - http://net.tutsplus.com/articles/news/using-the-wonderful-jflow-plugin-screencast/ )
(I don't want to call them all 'slide' and put them in an custom field array because there may be captions for each slide, and when both slides and captions are custom field arrays, the order may not match up)
Now, sometimes there will be only 3 slides entered (slide1 to slide3), and sometimes all 6 slides (slide1 to slide6).
Not being very PHP savvy, I wonder what the best way best way to stick these custom fields into a PHP array, and then iterate thru them to print out the code, which looks a bit like the below?
<div id="slides"> <div><img src="qwerty.jpg"> </div> <div><img src="foo.jpg"> </div> <div><img src="test.jpg"> </div> </div>
The code to print, for instance slide1's image, would be something like:
<img src="<?php echo wp_get_attachment_url($slide1); ?>">