Jump to content

mehenky

New Members
  • Posts

    5
  • Joined

  • Last visited

mehenky's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. im following the basic steps in: http://uk3.php.net/manual/en/simplexml.examples-basic.php that is working good. but now ive made this just to view: <?php $file = simplexml_load_file('stats.xml'); $check = new SimpleXMLElement($file); echo $check->counts[0]->total; ?> but im getting this error: what is wrong with the code? below how the xml looks like. <?xml version="1.0" encoding="UTF-8" standalone="true"?> <stats> <generated>140510</generated> <u id="2"> <user>meh</user> </u> <counts> <total>156715</total> <online> <now>125</now> <today>1111</today> <week>1576</week> </online> <registrations> <today>206</today> <week>505</week> </registrations> </counts> </stats>
  2. thanks adam, i think this is what i need.
  3. ah okay. yes i want to add the values to a db. im new to php so im looking for the easiest. i will have a look at it. thanks for the quick reply.
  4. Hello, i need some help/info about searching words in files (txt or xml) and saving them to db or another file. For example ive got an xml file like below: <families> <family> <name>brown</name> <city>denver</city> <members>12</members> </family> <family> <name>jackson</name> <city>new york</city> <members>6</members> </family> </families> i want to search for: <family> then save the lines till it comes to the word </family> and then goes to the next group. did some reading about array, preg_match, strpos functions but dont know where to start. what is the best way to do this? can you guys give me some advise... or links to good tutorials? thanks in advance!
  5. mehenky

    New Guy

    Hello, My name is Henk. im new to php so i tought lets sign up here I was reading about array function got some questions about that but i will make another topic about it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.