helal olsun teşekkür ederim kardeş.

ama satır yapısını kaybettim.
bu yapıyı liste haline nasıl çevireceğim.


<?php header('Content-type: Application/xml; chatset="utf-8"', true); ?>
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
<?php require_once('ayar_shoppincart.php');

$query = $db->prepare("SELECT * FROM _kategoriler");
$query->execute();
$data = $query->fetchAll(PDO::FETCH_ASSOC);

foreach($data as $dt){
echo '<url>'."\n";
echo '<loc>https://'.$_SERVER['SERVER_NAME'].'/'.$dt['seo_link'].'</loc>'."\n";
echo '<lastmod>'.date('Y').'-'.date('m').'-'.date('d').'T'.date('H:I:S').'00:00</lastmod>'."\n";
echo '<changefreq>weekly</changefreq>'."\n";
echo '</url>'."\n";}?>
</urlset>