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:[EMAIL PROTECTED]
 Independent Contractor
 303.809.4427

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to