473,395 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 29755

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Midgard | last post by:
I have this error: Fatal error: Cannot redeclare send_welcome_mail() (previously declared in /home/oxxowhol/public_html/config.php:21) in /home/oxxowhol/public_html/config.php on line 21 Why?
4
usafshah
by: usafshah | last post by:
Hi all, I installed a script and as i run it gives the following error: Fatal error: Cannot use object of type Session as array in c:\www\musicbox\index.php on line 2692 index.php ---> line...
4
by: Kesavan | last post by:
I need polymorphism in php. When I run this following code I get the following error. Fatal error: Cannot redeclare aClass::aPrint() in C:\Program Files \xampp\htdocs\k7\prCls.php on line 16 ...
2
by: srilathaapi | last post by:
Hi All, I am getting the error cannot redeclare the class some xxx in file xxx.php. bcz i m including xxx.php in 3 diffrent functions in the same file to invoke the 3 differnet functions in the...
1
Tarantulus
by: Tarantulus | last post by:
Hi Guys, I'll keep this short and sweet: class connection{ public $database; public $username; public $password;
5
by: Just Another Victim of the Ambient Morality | last post by:
I have a peculiar bug in my PHP code. It looks something like this: Fatal error: Cannot redeclare func_name() (previously declared in script.php:57) in script.php on line 57 I've done a...
5
by: samatair | last post by:
I get an error message like this. Fatal error: Cannot use string offset as an array in D:\www\site\includes\change_preference.inc.php on line 310 $cityName = $row2; The above code is causing...
1
by: mailbill | last post by:
Fatal error: Cannot re-assign $this in C:\Inetpub\vhosts\default.com\httpdocs\new\kd_xmlrpc.php on line 453 function XMLRPC_error($faultCode, $faultString, $server = NULL){ $array = array();...
4
by: Dharmendra Pardhi | last post by:
Hello everyone, Yesterday I was start work on an application that is made in php. this application is running well in my local server. but when I put it online some time it work fine but some time...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.