ID:               26976
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dylan dot egan at optusnet dot com dot au
-Status:           Assigned
+Status:           Closed
 Bug Type:         XML related
 Operating System: *
 PHP Version:      5CVS-2004-01-20 (dev)
 Assigned To:      sterling
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-01-20 20:47:45] dylan dot egan at optusnet dot com dot au

Well I tried with PHP 5Beta3 and it worked. Something changed in CVS I
guess. Will wait for patches on CVS.

Don't know what it could be.

------------------------------------------------------------------------

[2004-01-20 20:10:40] [EMAIL PROTECTED]

Here's simple test:
-----------------------------------------------------------
--TEST--
Bug #26976 (Can not access array elements using index)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip simplexml
extension is not loaded"; ?>
--FILE--
<?php

$root = simplexml_load_string(
'<?xml version="1.0"?>
<root>
 <child>a</child>
 <child>b</child>
 <child>c</child>
 <child>d</child>
</root>
');

echo $root->child[0], "\n";
echo $root->child[1], "\n";
echo $root->child[2], "\n";
echo $root->child[3], "\n";

?>
--EXPECT--
a
b
c
d
-----------------------------------------------------------

I get this output:

a
b
b
b

(foreach works fine though :)


------------------------------------------------------------------------

[2004-01-20 07:13:11] dylan dot egan at optusnet dot com dot au

Description:
------------
Trying to read through a parsed XML file with simpleXML, but I can't go
past the 2nd level of the array.

Reproduce code:
---------------
www.ircphp.com/157
   

Expected result:
----------------
Read --OUTPUT--



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26976&edit=1

Reply via email to