470,811 Members | 1,014 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

PHP Fatal error: Cannot use string offset as an array

[19] => Array
(
[tag] => UML:CLASS
[type] => open
[level] => 5
[attributes] => Array
(
[XMI.ID] => .:00000000000008EC
[NAME] => quiz_batteries
[VISIBILITY] => public
[ISSPECIFICATION] => false
[ISROOT] => false
[ISLEAF] => false
[ISABSTRACT] => false
[ISACTIVE] => false
)

[value] =>

)

$xmlarray[$x]['tag']['attributes']['NAME']

gives me

C:\prj\quiz>php argouml2sql.php quiz.xmi
PHP Fatal error: Cannot use string offset as an array in
C:\prj\quiz\argouml2sql.php on line 32

I also get the same error on
$id=$xmlarray[$x]['tag']['attributes']['XMI.ID'];
what am I doing wrong?
Mar 4 '06 #1
1 29507

"Jim Michaels" <NO***************@yahoo.com> wrote in message
news:L8********************@comcast.com...
[19] => Array
(
[tag] => UML:CLASS
[type] => open
[level] => 5
[attributes] => Array
(
[XMI.ID] => .:00000000000008EC
[NAME] => quiz_batteries
[VISIBILITY] => public
[ISSPECIFICATION] => false
[ISROOT] => false
[ISLEAF] => false
[ISABSTRACT] => false
[ISACTIVE] => false
)

[value] =>

)

$xmlarray[$x]['tag']['attributes']['NAME']

gives me

C:\prj\quiz>php argouml2sql.php quiz.xmi
PHP Fatal error: Cannot use string offset as an array in
C:\prj\quiz\argouml2sql.php on line 32

I also get the same error on
$id=$xmlarray[$x]['tag']['attributes']['XMI.ID'];
what am I doing wrong?

figured it out.
$xmlarray[$x]['attributes']['NAME']
$id=$xmlarray[$x]['attributes']['XMI.ID'];

Mar 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Midgard | last post: by
4 posts views Thread by Kesavan | last post: by
2 posts views Thread by srilathaapi | last post: by
5 posts views Thread by Just Another Victim of the Ambient Morality | last post: by
4 posts views Thread by Dharmendra Pardhi | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.