I'm trying to get some info out of an external xml file...
It's all working except one thing and I cannot figure out why ....
Here is what I have... from the nfl.xml file..
<gms w="22" y="2014" t="POST" gd="0" bf="0" bph="0">
<g eid="2015010301" gsis="56492" d="Sat" t="8:15" q="F" htn="Pittsburgh Steelers" hnn="steelers" h="PIT" hs="17" vtn="Baltimore Ravens" vnn="ravens" v="BAL" vs="30" n="NBC" rz="0" ga="" o="1" gt="WC"/>
I am able to get the elements 'w' 'htn' 'hs' 'vnn' 'vs' but what I'm not trying to do is get the 'g eid' element...
Here is what I have:
$gdate = (int)$xml->gms['g eid'];
$arr1 = str_split($gdate);
print_r($arr1);
I did this to see what it was returning and it returns Array ( [0] => 0 )
Can anyone give me a clue what I"m doing wrong here...
I want to get that line...explode it and return the value as a date... so g eid="2015010301" actually means 01/03/2015.. and that's what I'm trying to get to. Just not sure what I'm doing wrong here...
Thanks in advance!!
John