Re: PHP 4 OOP, re-using a object?
| From: | M. Sokolewicz | Date: | Sun, 10 Sep 2006 23:05:00 +0000 |
| Subject: | Re: PHP 4 OOP, re-using a object? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241568@lists.php.net to get a copy of this message | ||
Micky Hulse wrote:
Hi, I am slowly learning how to use classes properly... quick question: # Create the object: $doSplash = new RandomSplash(); // Create the object. Shouldn't I be able to call that object like below, throughout my page: ...HTML... <?php $doSplash->randomize('css'); ?> ...HTML... <?php $doSplash->randomize('xhtml top'); ?> ...HTML... <?php $doSplash->randomize('xhtml bot'); ?> ...HTML... Sorry, this is probably a noob question... I am pretty good at using functions, but classes are still new to me. Any help, even a RTFM link, would be really appreciated. :) Have a great day! Cheers, Mickyyou should be able to, and it works fine for me. www.php.net/oop will help, if you haven't read it. - tul