Sendi með eina kóða línu til að reyna að útskýra þetta betur.
<image url="Hérna vil ég hafa slóð á mynd sem er sótt í grunninn" caption="líka sótt í grunninn" link="" />
<image url="Hérna vil ég hafa slóð á mynd sem er sótt í grunninn" caption="líka sótt í grunninn" link="" />
<?php header("Content-type: text/xml"); echo('<?xml version="1.0" encoding="utf-8"?> <slideshow version="2"> <layout> <vbox> <vboxitem id="images" height="100%" padt="0" padr="0" padb="0" padl="0" /> </vbox> </layout> <background color="#FFFFFF" fade="false" transparent="false" /> <caption font="Verdana" size="10" color="#000000" bold="false" align="center" selectable="false" border="false" /> <thumbnails border="true" horizontal="false" /> <controls bgcolor="#C5CED5"> <title text="" font="Arial" size="16" color="#333333" bold="true" /> <buttons> <item id="first" label="<<" /> <item id="prev" label="<" /> <item id="gotobox" label="" /> <item id="next" label=">" /> <item id="last" label=">>" /> <item id="autoplay" label="Autoplay?" /> </buttons> </controls> <images autoplay="true" loop="true" delay="6" requireloaded="10000" usecache="true" linktarget="_self" transition="Fade">'); $images = array("grass", "lotus", "petunia", "sunflower", "wall", "apple", "bluesky", "tennis", "baseball", "winter"); $randImages = array_rand($images, 4); foreach ($randImages as $i) { echo('<image url="images/photos/' . $images[$i] . '_small.jpg" caption="" link="" />'); } echo(' </images> </slideshow>'); ?>