PHP 4 OOP, re-using a object?
| From: | Micky Hulse | Date: | Sun, 10 Sep 2006 22:34:02 +0000 |
| Subject: | PHP 4 OOP, re-using a object? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-241567@lists.php.net to get a copy of this message | ||
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,
Micky
--
Wishlist: <http://snipurl.com/vrs9>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>