Re: Basics of OOP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-09-09 at 20:09 +0100, Ben Stones wrote:
> Hi,
> 
> The following bit of code doesn't output anything:
> 
> <?php
>     class output {
>         var $text;
>         function outputText() {
>             $this->text = "Hello World";
>             echo $this->text;
>         }
>     }
> 
>     $class = new output();
>     $class->outputText;

Should be $class->outputText();

Same with other example.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux