php - XML Parsing Error: junk after document element. not dump </kurz> i have no idea

964
<?php

  $dotaz=mysql_query("SELECT * FROM `Jazykove_kurzy`");

  $b="</kurz>\n";

if($dotaz) while($data = mysql_fetch_array($dotaz)) {

 $kod = "<kurz ID=\"$data[ID]\">         
    <jazyk>$data[jazyk]</jazyk>
    <pocet>$data[pocet]</pocet>
    <rozsah>$data[rozsah]</rozsah>
    <mesto>$data[mesto]</mesto>
    <cena>$data[cena]</cena>
    <lektori>$data[lektori]</lektori>
    <platnost>$data[platnost]</platnost>"; 

There is problem... when it write$b to$soubor, I have error

fwrite($soubor, $kod);
fwrite($soubor, $b);
}
fclose($soubor);

    ?>

I have no idea. Please help.

People are also looking for solutions to the problem: php - Select mySQL data with help of other table

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.