View Single Post
  #13 (permalink)  
Old Jan 5th, 2008, 10:25
Rakuli's Avatar
Rakuli Rakuli is offline
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: XML > MySQL?

Okay I didn't so that quite right I don't think..

PHP: Select all

define('XML''numbers.xml');

$xml = new SimpleXMLElement(XMLNULLtrue);
$numbers $xml->children();
$numbers $numbers[0]
for(
$i 4$i 200$i++) {
$numbers->addChild('no'$i);
}
foreach(
$numbers as $n) {echo $n.'<br';} 
I forgot to grab the reference to numbers -- I was adding one previously... This meant there were two lots of numbers.
Reply With Quote