Re: mySQL Results To XML -- my xmltag() functions

From: Date: Sat, 06 Oct 2007 21:56:00 +0000
Subject: Re: mySQL Results To XML -- my xmltag() functions
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-262884@lists.php.net to get a copy of this message
<posted & mailed> mike wrote: > I made this at one point: > > function array2xml($array, $complete = true) { > $xml = "<$array[NODE] "; > unset($array['NODE']); > ksort($array); > foreach(array_keys($array) as $key) { > $xml .= "$key=\"$array[$key]\" "; > } > if($complete) { > $xml .= "/"; > } > $xml .= ">"; > return $xml; > } What about the reverse - converting the XML back to MySQL? (I'm interested for an address book project, but don't know too much of XML or mySQL!)

« previous php.general (#262884) next »