accessing functions inside a class
| From: | Prince | Date: | Mon, 21 Apr 2003 13:41:19 +0000 |
| Subject: | accessing functions inside a class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144632@lists.php.net to get a copy of this message | ||
if you have a function inside of a class like:
class db {
function connect() {
//put whatever code here
}
function get_row($result_query) {
//code here
} }
now to get to those functions would i use:
$db_name = new db;
$db_name->connect();
$db_name->get($var);
or would it be:
$db_name=new db;
$db_name.connect();
$db_name.get($result);
or will both work?