09-26-2007, 10:22 PM
|
#2 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
|
Hey,
Thanks for this, just a quick question regarding this... I once wrote this code:
PHP Code:
<?php
// Header
header('Content-type: text/xml');
header('Pragma: public');
header('Cache-control: private');
header('Expires: -1');
// GET
switch($_GET['xml']) {
// Roster
case "roster" :
switch($_GET['brand']) {
// RAW
case "raw" :
// Querys
$raw = mysql_query("SELECT * FROM diary_roster WHERE status = '".$_GET['brand']."'") or die(mysql_error());
// XML
echo('<?xml version="1.0" encoding="utf-8"?>
<diary>
<raw>');
while($row = mysql_fetch_array($raw)) {
echo('
<superstar>
<id>'.$row['id'].'</id>
<name>'.$row['name'].'</name>
<status>'.$row['status'].'</status>
<alignment>'.$row['alignment'].'</alignment>
</superstar>
');
}
echo('</raw>
</diary>');
break;
}
break;
}
?>
Basically I can do all that in a more readable format using DOM?
__________________
Not quite a n00b...
|
|
|
|