Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [xml] problem z pobieraniem czesci danych
terabit
post
Post #1





Grupa: Zarejestrowani
Postów: 170
Pomógł: 4
Dołączył: 11.08.2006

Ostrzeżenie: (10%)
X----


Witam,

mam taki kod:
  1.  
  2. <odds_list>
  3.  
  4. <sport id="1000093178" name="Cricket" main_group_id="1000093178">
  5. <pool id="1000093838" name="The Ashes - Series" main_group_id="1"></pool>
  6. </sport>
  7.  
  8. <sport id="1000093178" name="Golf" main_group_id="2">
  9. <pool id="1000093838" name="The Ashes - Series" main_group_id="2"></pool>
  10. <pool id="1000093838" name="The Ashes - Series" main_group_id="2"></pool>
  11. <pool id="1000093838" name="The Ashes - Series" main_group_id="2"></pool>
  12. <pool id="1000093838" name="The Ashes - Series" main_group_id="2"></pool>
  13. </sport>
  14.  
  15. <sport id="1000093178" name="Pilka" main_group_id="3">
  16. <pool id="1000093838" name="The Ashes - Series" main_group_id="3"></pool>
  17. <pool id="1000093838" name="The Ashes - Series" main_group_id="3"></pool>
  18. <pool id="1000093838" name="The Ashes - Series" main_group_id="3"></pool>
  19. <pool id="1000093838" name="The Ashes - Series" main_group_id="3"></pool>
  20. </sport>
  21.  
  22. </odds_list>
  23.  


i teraz z pobieraniem tytulow, id (pilka, golf, crickiet) w SimpleXML nie ma problemu...

jednak chce najpierw pobrac tytul a poniez pod nim wyswietlic wszystkie wartosci name z pól "pool"

ma to mnie-wiecej tak wygldac:

Cricket:
-The Ashes - Series

Golf:
-The Ashes - Series
-The Ashes - Series
-The Ashes - Series
-The Ashes - Series

itd...


problem w tym ze nie wiem jak mam te elementy pobrac wedlog main_group_id...

pomoze ktos? (IMG:style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 02:18