Herkes bir XML dosyasından bilgi almak ve .. Bu XML şema php kullanarak bir form select / listesine çevirmek için nasıl bilir merak ediyordum:
<?xml version="1.0" encoding="utf-8"?>
<expose version="2.1">
<collection _mngid="1">
<collection _mngid="1">
<title>Heatherton Football Club</title>
<thumb>
<url>albthumbs/albth_1.jpg</url>
</thumb>
<collection _mngid="8">
<title>2009 Season</title>
<thumb>
<url>albthumbs/albth_8.jpg</url>
</thumb>
<album _mngid="2">
<title>Round 17</title>
<contentxmlurl>alb_2.xml</contentxmlurl>
<contentnumber>20</contentnumber>
<thumb>
<url>albthumbs/albth_2.jpg</url>
</thumb>
</album>
</collection>
<album _mngid="3">
<title>Auskick</title>
<contentxmlurl>alb_3.xml</contentxmlurl>
<contentnumber>35</contentnumber>
<thumb>
<url>albthumbs/albth_3.jpg</url>
</thumb>
</album>
</collection>
<collection _mngid="4">
<title>Events Gallery</title>
<thumb>
<url>albthumbs/albth_4.jpg</url>
</thumb>
<album _mngid="5">
<title>80's Night</title>
<contentxmlurl>alb_5.xml</contentxmlurl>
<contentnumber>43</contentnumber>
<thumb>
<url>albthumbs/albth_5.jpg</url>
</thumb>
</album>
</collection>
<collection _mngid="6">
<title>Match Highlights</title>
<thumb>
<url>albthumbs/albth_6.jpg</url>
</thumb>
<album _mngid="7">
<title>Match Highlights</title>
<contentxmlurl>alb_7.xml</contentxmlurl>
<contentnumber>10</contentnumber>
<thumb>
<url>albthumbs/albth_7.jpg</url>
</thumb>
</album>
</collection>
</collection>
</expose>
Ben "contentnumber" sayı ve böyle bir formu seçmek / liste oluşturmak için "başlığı" gerekir:
<select name="select" id="select">
<option value="20">Round 17</option>
<option value="35">Auskick</option>
<option value="43">80's Night</option>
<option value="10">Match Highlights</option>
</select>
Bu bile mümkün mü? Ben sadece bir "contentnumber" ile olanlar gerekir (ve tabii ki "title" bulunuyor) Bu dinamik php üzerinden de çekilmiş olması gerekiyor :) Herkes bana yardımcı olabilir misiniz?