php - Parse error: syntax error, unexpected end of file in -
this question has answer here:
- php parse/syntax errors; , how solve them? 11 answers
i have code id php export xml, , dont know, problem ?
<?php $data=mysql_query("select * ``"); while($zaznam=mysql_fetch_array($data)){ $select = "select * `` id=".$zaznam['id'].""; $proved = mysql_query($select) or die ( mysql_error() ); $xml_output = "<?xml version=\"1.0\"?>\n"; $xml_output .= "<kurzy>\n"; for($x = 0 ; $x < mysql_num_rows($proved) ; $x++){ $row = mysql_fetch_assoc($proved); $xml_output .= "\t<kurz>\n"; $xml_output .= "\t</kurz>\n"; } $xml_output .= "</kurzy>"; echo $xml_output; ?>
my code write error, no. problem ?
missing closest of while loop }
last line
$data=mysql_query("select * ``"); while($zaznam=mysql_fetch_array($data)){ $select = "select * `` id=".$zaznam['id'].""; $proved = mysql_query($select) or die ( mysql_error() ); $xml_output = "<?xml version=\"1.0\"?>\n"; $xml_output .= "<kurzy>\n"; for($x = 0 ; $x < mysql_num_rows($proved) ; $x++){ $row = mysql_fetch_assoc($proved); $xml_output .= "\t<kurz>\n"; $xml_output .= "\t\n"; } $xml_output .= "</kurzy>"; echo $xml_output; } ?>
Comments
Post a Comment