hello,
i have this error Parse error: syntax error, Parse error: syntax error, unexpected 'items' (T_STRING) when i execute my file php in the following my code :
Thanks in advance
i have this error Parse error: syntax error, Parse error: syntax error, unexpected 'items' (T_STRING) when i execute my file php in the following my code :
Code:
<?php include_once("connect.php"); mysql_select_db($dbname, $conn); $sql = "SELECT * FROM `jo_jomres_schedule_1`,'joM_1','joM_75','joM_76'"; $db_items = mysql_query($sql); $xml = new DOMDocument('1.0', 'UTF-8'); if (mysql_num_rows($db_items) != NULL){ $items = $xml->createElement(« items »); while ($db_item = mysql_fetch_assoc($db_items)){ $item = $xml->createElement(« item »); foreach($db_item as $key => $value){ $node = $xml->createElement($key,$value); $item->appendChild($node); } $items->appendChild($item); } $xml->appendChild($items); } echo $xml->saveXML(); ?>
Comment