php nested classes

I have a class that I use for all of my MySQL functions. Connecting to the database, getting records writing records, etc...

I'm now developing a catalog for a client and I wish to use a class here as well. If I create a MySQL object inside of the new Catalog class, how do I refer to the properties of the MySQL object.

Here is an example of some of my code, not exact, but you should get the idea.

class Catalog {
  var ...............
    .............. more property definitions

  var $db_connection;

  function Catalog() {
    if ($this->db_connection = new MySQL(DB_HOST, DB_USER, DB_PASSWORD, DB_DB)) {


now, one of the properties of the MySQL object is $return_array. I would usually refer to this property as:
within the Catalog Class would I refer to this property as $this->db_connection->return_array ?

is this correct?

somehow that does not look right to me. Can someone tell me how to refer to that property? Am I going about this the wrong way? Is there a better way to accomplish what I am after?
LVL 18
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

> within the Catalog Class would I refer to this property as $this->db_connection->return_array ?
yes that a correct

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hube02Author Commented:
Thanks, I needed to be sure. Trying very hard to move completely away from procedural programming techniques.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.