[PHP] Public in Classes

2008-09-21 Thread Ben Stones
Hi, Just started with object oriented programming and glad I have come across it, just need a few things clearing up. When I make a variable or method public, does this mean that it can be used outside of classes, for instance in other classes or as well as instantiating classes? So if I made it

Re: [PHP] Public in Classes

2008-09-21 Thread Ólafur Waage
Here you go. http://talks.php.net/show/php5_ca/4 Ólafur Waage [EMAIL PROTECTED] 2008/9/21 Ben Stones [EMAIL PROTECTED]: Hi, Just started with object oriented programming and glad I have come across it, just need a few things clearing up. When I make a variable or method public, does this

Re: [PHP] Public in Classes

2008-09-21 Thread Jochem Maas
Ben Stones schreef: Hi, Just started with object oriented programming and glad I have come across it, just need a few things clearing up. When I make a variable or method public, does this mean that it can be used outside of classes, for instance in other classes or as well as instantiating

Re: [PHP] Public in Classes

2008-09-21 Thread Ben Stones
Hi, I have this piece of code that I have created: class userQueries { public function numberUsers() { $get_users=mysql_query(SELECT * FROM `users` WHERE `online` NOW()) or exit(../includes/error.php); } } class usersOnline extends userQueries { public function

Re: [PHP] Public in Classes

2008-09-21 Thread Ashley Sheridan
On Sun, 2008-09-21 at 12:24 +0100, Ben Stones wrote: Hi, Just started with object oriented programming and glad I have come across it, just need a few things clearing up. When I make a variable or method public, does this mean that it can be used outside of classes, for instance in other

Re: [PHP] Public in Classes

2008-09-21 Thread Jochem Maas
Ben Stones schreef: Hi, I have this piece of code that I have created: class userQueries { public function numberUsers() { $get_users=mysql_query(SELECT * FROM `users` WHERE `online` NOW()) or exit(../includes/error.php); } } class usersOnline extends userQueries { public