Re: PHP/MySQL/XML

From: Date: Mon, 01 Apr 2002 21:32:11 +0000
Subject: Re: PHP/MySQL/XML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91031@lists.php.net to get a copy of this message
Shoot, kind of an important error I made in the code I gave you earlier -- the closing quote for $xml_document should be a single-quote, not a double-quote as I wrote. Sorry, Erik On Monday, April 1, 2002, at 04:26 PM, Erik Price wrote:
Still, you want some advice? First, your SQL code won't work as it is -- you've forgotten a mysql_fetch_* function to pull the data from the $sql_result. So, add to your code: while ($xml_data_row = mysql_fetch_assoc($sql_result)) { $xml_document = '<?xml version="1.0" encoding="utf-8" ?> <test> <contacts>
    <friends>
      <name>' . $xml_data_row['name'] . '</name>
      <address>' . $xml_data_row['address'] . '</address>
      <city>' . $xml_data_row['city'] . '</city>
      <state>' . $xml_data_row['home'] . '</state>
    </friends>
</contacts> </test> ";
---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#91031) next »