','>',$xmlStr);
$xmlStr=str_replace('"','"',$xmlStr);
$xmlStr=str_replace("'",''',$xmlStr);
$xmlStr=str_replace("&",'&',$xmlStr);
$xmlStr=str_replace("(",'(',$xmlStr);
$xmlStr=str_replace(")",')',$xmlStr);
return $xmlStr;
}
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");
$query = sprintf("SELECT bid, brewname, brewdesc, labellink, beerlink, miscfield FROM listofbrews ORDER BY bid");
$resultID = mysql_query($query, $linkID) or die("Data not found.");
$xml_output = "";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t
";
$xml_output .= "
';
$xml_output .= "
';
$xml_output .= "
'; $xml_output .= ""; $xml_output .= ""; $xml_output .= " view something special
\n";
}
$xml_output .= "";
echo $xml_output;
?>
".$row['brewname'] . '
'; $xml_output .= $row['brewdesc'] . ''; $xml_output .= ""; $xml_output .= ""; $xml_output .= " view something special