|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi!
I have a php script that uses classes and functions. The problem is that I need my sub functions to use and reach the same variabl myvar. But as it is now, it doesn't work. The functions are actually build in XML functions so I can't parse any variables to these functions. I am used to PHP but have little experience of classes in PHP. This script is part of AMFPHP the alternative to Flash Remoting so the following structure need to be the same. How can I solve this? This simple example shows ruffly what I want to do: PHP Code:
Thanks in advance! Ellen |
|
#2
|
||||
|
||||
|
I don't see the point of using a vaguely OO structure if you're not taking advantage of the benefits of OOP. I believe you can have nesting functions in python, but to my knowledge, this is not possible in PHP. If you're using globals in OOP, you're doing something wrong.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
Hi again!
I am using classes because it is part of AMF PHP www.amfphp.org where the following structure is needed. Cheers, glanneus |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Global variables and classes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|