BR
asked on
Simple PHP and XML data show, $xml->flush();
Dear Experts,
I use below code to select the merchants to display them on the map.
If I select the 15-20 data the result shows up, but if I select more than 20 data the below xml code is not working.
I don't understand why it is not working with more than 20 data?
What do you suggest I should do?
what I need is to show it with XML.
thank you
$mysqli->query("set names utf8mb4");
$sql = "I select here the merchants";
$res = $mysqli->query($sql);
$xml = new XMLWriter();
$xml->openURI("php://outpu t");
$xml->startDocument();
$xml->setIndent(true);
$xml->startElement('marker s');
while ($row = mysqli_fetch_assoc($res)) {
$xml->startElement("marker ");
$xml->writeAttribute('id', $row['uid']);
$xml->writeAttribute('name ', $row['isim']);
$xml->writeAttribute('addr ess', $row['adres']);
$xml->writeAttribute('lat' , $row['lat']);
$xml->writeAttribute('lng' , $row['longt']);
$xml->writeAttribute('type ', $row['bayituru']);
//$xml->writeRaw($row['lng ']);
$xml->endElement();
}
$xml->endElement();
header('Content-type: text/xml');
$xml->flush();
I use below code to select the merchants to display them on the map.
If I select the 15-20 data the result shows up, but if I select more than 20 data the below xml code is not working.
I don't understand why it is not working with more than 20 data?
What do you suggest I should do?
what I need is to show it with XML.
thank you
$mysqli->query("set names utf8mb4");
$sql = "I select here the merchants";
$res = $mysqli->query($sql);
$xml = new XMLWriter();
$xml->openURI("php://outpu
$xml->startDocument();
$xml->setIndent(true);
$xml->startElement('marker
while ($row = mysqli_fetch_assoc($res)) {
$xml->startElement("marker
$xml->writeAttribute('id',
$xml->writeAttribute('name
$xml->writeAttribute('addr
$xml->writeAttribute('lat'
$xml->writeAttribute('lng'
$xml->writeAttribute('type
//$xml->writeRaw($row['lng
$xml->endElement();
}
$xml->endElement();
header('Content-type: text/xml');
$xml->flush();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found my own answer, thank you
ASKER