Je me demandais si quelqu'un sait comment obtenir des informations à partir d'un fichier XML et le transformer en une forme sélectionner/liste en utilisant php .. Ceci est le schéma XML:éléments XML au formulaire Sélectionnez Menu (en php?)
<?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>
J'ai besoin du numéro de « contentnumber » et le « titre » pour créer une forme de sélection/liste comme ceci:
<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>
Est-ce même possible? J'ai juste besoin de ceux avec un "contentnumber" (et bien sûr c'est "title") Il doit être dynamiquement tiré par php :) Quelqu'un peut-il m'aider?