Created
September 28, 2012 02:43
-
-
Save hidayat365/3797653 to your computer and use it in GitHub Desktop.
XML buat @Bertho Joris
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
while ($r = mysql_fetch_array($q)) { | |
// open channel header | |
$CN = $r['channel_name']; | |
$xml .= "<channel name='".$CN."'>"; | |
// event details for channel | |
$sql2 = "select * FROM epg where channel_name='".$CN."'"; | |
$q2 = mysql_query($sql2) or die(mysql_error()); | |
while($r2 = mysql_fetch_array($q2)) { | |
$Mulai = date('H:i', strtotime($r2['waktu_mulai'])); | |
$Selesai = date('H:i', strtotime($r2['waktu_akhir'])); | |
$Title = $r2['judul']; | |
$Desk = $r2['sinopsis']; | |
$xml .= "<event start='".$Mulai."' end='".$Selesai."'>"; | |
$xml .= "<title>".$Title."</title>"; | |
$xml .= "<description>".$Desk."</description>"; | |
$xml .= "</event>"; | |
} | |
// close channel | |
$xml .= "</channel>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment