newbie questions
| From: | Kevin Bridges | Date: | Sun, 29 Aug 2004 19:22:27 +0000 |
| Subject: | newbie questions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-195106@lists.php.net to get a copy of this message | ||
Greetings php-general,
I'm just starting out with php ... judging from the posts I've been
reading on this list I'm thinking this question is so basic it might
almost be pathetic! I'm assuming the answers are in the php manual,
but I have not found the correct pages ... any pointers to manual
pages, tutorials, or an explanation would be greatly appreciated.
<?php
require_once 'library/functions/dbConnect.php';
class Content {
var $db = null; // PEAR::DB pointer
function Content(&$db) {
$this->db = $db;
}
}
?>
I'm writing my first class following an example I found on the web
and I have 2 questions. The constructor for Content accepts an
object ... why is &$db used instead of $db?
I'm used to a this.varName syntax from other languages ... I grasp
what is happening with $this->db, but I don't understand the literal
translation of -> and would like help understanding.
--
Best regards,
Kevin Bridges mailto:cyberswat@wispertel.net
Independent Contractor
303.809.4427