Jump to content

xml element


cowboysdude

Recommended Posts

I'm trying to get an element out of an xml file but it keeps returning just 0 and I'm not sure why...

<g eid="2015010301" gsis="56492" d="Sat" t="8:15" q="F"/>

I'm trying to read the ['g eid'] and print it.    So I'm using this:

$gdate = (int)$xml->gms['g eid'];
  $arr1 = str_split($gdate);
  print_r($gdate);

I'm using that to see what prints out so I can use it how I need to use it...  when I do it returns this:

 

Array ( [0] => 0 )

I'm trying to get it to return the g eid element.

 

What am I doing wrong here?

 

Thanks!!!  :happy-04: 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/294252-xml-element/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.