Jump to content

Darla

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by Darla

  1. ahh I found it - seems it was set to the variable $results later - it was supposed to be a table but turns out it was a string, when I tried the originale table name it worked Sorry to have bothered you and thanks for helping!! Btw: what do you prefer when fetching from xml? simple_xml, dom or parse_xml? Have a nice evening!
  2. I get an output of a simple "r", my code was like you said: $boat= $results[1]; echo $boat['value'];
  3. did not seem to work, [value] => 6 is the one I am trying to get, this is what you meant too right?
  4. Like this: Array ( [0] => Array ( [tag] => TRANSPORTATION [type] => open [level] => 1 [value] => ) [1] => Array ( [tag] => BOAT [type] => complete [level] => 2 [value] => 6 ) ...
  5. Hello I am kindof a newbie on this so bare with me.. I have used xml_parser to read some xml and put the values in an array using xml_parse_into_struct. This xml is stored in $results. I get the values when doing this: print_r($results); However, I'd like to get my hands on some of the simple values from the xml in neat variables so I can further put them into a db. I have tried accessing the values like this: echo $results[0]; echo $results["boat"]; echo $results['boat']; But all it returns is a simple 'A'. Great if someone could give me a tip on this. Also, I am wondering what is the best way to fetch xml: xml_parse, DOM or simplexml? Darla
×
×
  • 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.