<?php
header ("Content-type: text/xml");
echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php
include("FeW34Tgi95tgJj7/config.php");
$result = mysql_query("SELECT subcat_id,title,description,UNIX_TIMESTAMP(datetime) AS pubDate FROM ccs_store_inventory WHERE subcat_id IS NOT NULL GROUP BY subcat_id ") or die (mysql_error());
while ($row = mysql_fetch_array ($result)) {
?>
   <url>
    <loc>https://www.mytub.co.uk/<? echo strtolower(str_replace(' ', '-', $row['subcat_id'])); ?>-suites-1</loc>
    <lastmod><?=date('Y-m-d', $row['pubDate']);?></lastmod>
    <changefreq>monthly</changefreq>
   </url>  
<? } ?> 
</urlset>