Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [XML][PHP] Pobranie danych
Randallmaster
post
Post #1





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Witam,

Moglibyście mi przesłać przykładowy skrypt który pobiera dane w php za pomocą pętli. Znalazłem dużo artykułów ale stale wywala mi błąd:

This page contains the following errors:

error on line 13 at column 3: Extra content at the end of the document
Below is a rendering of the page up to the first error.

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Randallmaster
post
Post #2





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Poprałem przykładowy przykład z internetu:

  1. <?php
  2. header('Content-Type: application/xml; charset=utf-8');
  3.  
  4. include 'inc/db.php';
  5.  
  6. $sql = mysql_query("SELECT `nazwa`,`id`,`platforma` FROM `gry`");
  7. ?>
  8.  
  9. <?xml version="1.0" encoding="utf-8"?>
  10.  
  11. <pages>
  12.  
  13. <?php
  14. while($row = mysql_fetch_array($sql)){
  15. ?>
  16. <link>
  17. <title><?php echo $row['nazwa']; ?></title>
  18. <url>/gra,<?php echo $row['id']; ?>.html</url>
  19. <urlimg><?php echo $row['platforma']; ?></urlimg>
  20. </link>
  21. <?php
  22. }
  23. ?>
  24. </pages>


sprawdziłem u siebie i niestety. Ale jak mi podpowiecie w czym mogę robić to nie pogardzę (IMG:style_emoticons/default/smile.gif)

Ten post edytował Randallmaster 11.10.2013, 10:41:24
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: 11.10.2025 - 03:27