heres a question, I am using this to update an xml file...

the vars originate from a flash interface, so they are all strings, do I
need to worry about anything here?
should i be usiung arrays in php to house the info or is this sufficient?

I am using php only to add new entries, the flash parses and loads the xml
file seperately

"Travis" <[EMAIL PROTECTED]> wrote in message
just a quick syntax question: here is my php

$openingItemTag = "<item>\n";
$openingEntry = " <entry ";
$numberAtt = "number=";
$nameAtt = "name=";
$dateAtt = "date=";
$messageAtt = "message=";
$linkAtt = "link=";
$closingEntry = "/>\n";
$closingItemTag = "</item>";

$messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry;
$Item = $openingItemTag.$Entry.$closingItemTag;

$fp = fopen ("news.xml", "a");

if done twice it returns this:

 <entry number=01name=travisdate=01.08.02message=hello
 <entry number=01name=travisdate=01.08.02message=hello

i want it to display as follows:

 <entry number="01" name="travis" date="01.08.02" message="hello world"
 <entry number="01" name="travis" date="01.08.02" message="hello world"

now it is writing to the file I want perfectly....but but but I need to add
quotes around the attributes and spaces between each attribute, and a line
break before each item
what do I need to add to $Entry to get that to display correctly

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to