Jay Blanchard wrote:
> [snip]
> if i declare an instance of a class in the top of my php file, then  
> have html, then later on user $myClassInstance->myMethod(); --  
> myMethod() does not execute, only when i have the instantiation of the  
> class right before the call to the method does it work. any ideas?
> [/snip]
>
> You are no longer running the script once the output has been sent to
> the screen. You need to flush output to the screen or re-order your
> code.
>
> http://www.php.net/flush
>
>   
Can't be true

<?php

class a {
        public function test() {
                echo "hello";
        }
}
$a = new a();
?>
<html>
<body>
testing... <br>
<?php

$a->test();

?>
</body>
</html>


Definitely works.

-- 
==================
Nick Stinemates ([EMAIL PROTECTED])
http://nick.stinemates.org

AIM: Nick Stinemates
MSN: [EMAIL PROTECTED]
Yahoo: [EMAIL PROTECTED]
==================

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

Reply via email to