php3-list | 199903
Date: 03/30/99
- Next message: Adam Gotheridge: "[PHP3] sybase / php3 on win32"
- Previous message: Adam Gotheridge: "Re: [PHP3] Problems setting up php"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] Accessing variables created in a class"
- Reply: Rasmus Lerdorf: "Re: [PHP3] Accessing variables created in a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a variable that is defined within a class that I want to send to the
screen.
<?
class myClass{
$myVar = "anyString";
}
$newObj = new myClass;
print $newObj->myVar; (from manual, cart example; also tried with echo)
?>
This doesn't send the value of $myVar to the screen. However, if I have an
echo in the class itself it prints the variable but for real world use I
would want to be able to print the variable at any time.
What am I missing. The example in the manual is a little different in that
the variable was set from outside of the class, so to speak. What is the
solution?
Thanks in advance.
Steve
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Adam Gotheridge: "[PHP3] sybase / php3 on win32"
- Previous message: Adam Gotheridge: "Re: [PHP3] Problems setting up php"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] Accessing variables created in a class"
- Reply: Rasmus Lerdorf: "Re: [PHP3] Accessing variables created in a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

