Link to home
Start Free TrialLog in
Avatar of BR
BRFlag for Türkiye

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://output");
$xml->startDocument();
$xml->setIndent(true);

$xml->startElement('markers');

while ($row = mysqli_fetch_assoc($res)) {
  $xml->startElement("marker");

 $xml->writeAttribute('id', $row['uid']);
  $xml->writeAttribute('name', $row['isim']);
 $xml->writeAttribute('address', $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();
Avatar of BR
BR
Flag of Türkiye image

ASKER

it only shows 39 elements, if I select more than 39, it shows nothing. thank you
ASKER CERTIFIED SOLUTION
Avatar of BR
BR
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BR

ASKER

I found my own answer, thank you