Baez Posted May 17, 2010 Share Posted May 17, 2010 I'm completely dumbfounded by this and I have no idea what's going wrong. If anyone can help that would be great. This is the block of code. $i = 0; while ($reader->read()) { if ($reader->nodeType == XMLReader::TEXT) { $show[$i] = $reader->value; } $i++; } return $show; It should grab the data from the XML sheet and store the value each time in the array. However it doesn't store anything. If I change "$show[$i] =" to "$show .=" it stores everything fine. I have no idea where I'm going wrong. Thanks Link to comment https://forums.phpfreaks.com/topic/201997-storing-xml-data-in-an-array/ Share on other sites More sharing options...
Baez Posted May 17, 2010 Author Share Posted May 17, 2010 Still cannot figure this out. I've been sitting here staring at this code for too long now hehe Link to comment https://forums.phpfreaks.com/topic/201997-storing-xml-data-in-an-array/#findComment-1059350 Share on other sites More sharing options...
Baez Posted May 17, 2010 Author Share Posted May 17, 2010 I submitted this as bug in PHP. I cannot figure out any way to get it to store each value in an array. Link to comment https://forums.phpfreaks.com/topic/201997-storing-xml-data-in-an-array/#findComment-1059638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.