Dynamic paths?

ok… this is stupid, but why doesn’t this work?

this[varaddress].this[pathvar].whatever = "hello, world!"

How can I achieve that? :slight_smile:

Just a hunch, I don’t know if it really will work, but try this…

[AS]this[varaddress][pathvar].whatever = “hello, world!”[/AS]

that did it! :beam:

thanks a lot lost :slight_smile:

No problem :wink: :slight_smile: I am glad I could help the almighty ahmed :beam:

lol :beam:

i’m not even near to being almighty though… :beam:

Hehe… if you say so ::rolls eyes::

Well since your problem is solved I hope you don’t mind if I hijack your thread to ask you a question now. Since I know you know server-side scripting and PHP stuff I was wondering if you knew any way to use PHP to write to an external .XML file without having to install a custom class on the server. Is it possible?

I don’t know too much PHP, but i’ve been searching all day and all I can find are things saying to install an XML class thing on the server and blah blah blah so I doubt it’s possible, but I need one last opinion before I scrap the project :beam:

hmm… i haven’t done any xml in php so far… i, very stupidly, skipped that chapter… i’ll look it up though if you want me to :wink:

I would be very grateful if you could do that :beam: But it’s not really that big a deal to me, just something I was working on as an experiment so it’s not that important.

If you want to see it to get a better idea what I am doing I can PM you a link to it (keeping it on the down low right now, possibly forever if I can’t complete it, but it’s just an experiment so who cares)

There are two common APIs for handling XML and XML documents:the Document Object Model (DOM) and the Simple API for XML (SAX). PHP4 has one module for each API. The SAX module is now included by default in all PHP distrubtions; the DOM XML module is optional.

You can use either API to parse and change XML documents. To create or extend and XML document entirely through the PHP interface (in other words, without writing any of it by hand), you must use the DOM.

so apparently DOM is optional, it needs to be installed separatly, and its the only API that lets you create xml documents ;(

EH… oh well then :-\ THANKS!!! :slight_smile:

hehe no problem… and now… back to the original topic…

I just realized that I asked something different from what i really was looking for (although what I asked still was another thing i wanted to know)… stupid me…

im trying to access a variable in a shared object, here’s what i’m trying to do actually:

this["xposition"+num] = myRSO.data.this["xposition"+num]

… but i get an error saying Expected a field name after ‘.’ operator.

any ideas how would i do that? :slight_smile:

k… nevermind, fixed it :slight_smile:

this["xposition"+num] = myRSO.data["xposition"+num]

:wink: Good Job