ACCESS CLASSES

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

ACCESS CLASSES

Post by kendall »

hey,

quick review here

i want to fid out if i can assign variables to a class from within a function that is not in the class?

and can i access a class attribute in a function ?

what about globalizing the class so as to access it from page to page and include pages?

Kendall
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: ACCESS CLASSES

Post by BDKR »

Before going off in a direction in particular, can I ask what you're trying to do?

Cheers,
BDKR
rev
Forum Commoner
Posts: 52
Joined: Wed Oct 02, 2002 3:58 pm
Location: Atlanta, GA

Post by rev »

Kendall,
To be perfectly blunt here, I suggest reading a bit more about classes and how they are to be used.

http://www.php.net/manual/en/language.oop.php
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

that are at least three topics each worth a whole tutorial (certainly there are already some) to cover it in general.
I pick the one that is least general ;)
what about globalizing the class so as to access it from page to page and include pages?
making data available throughout several requests(/pages) is no matter of globalizing. There are several ways to do this and one of them is session support that was added to php 4. serializing objects(/classes) is described at http://www.php.net/manual/en/language.oop.serialization.php
Post Reply