How to create a constructor in a php class?

Posted by almost dead on Stack Overflow See other posts from Stack Overflow or by almost dead
Published on 2010-05-21T09:41:32Z Indexed on 2010/05/21 9:50 UTC
Read the original article Hit count: 106

Filed under:
|

All methods in my php class must connect to the database, so I think it is a good idea to connect to the database in the constructor function (in the first place, to speak so). Is it normal to do so? And how to create a constructor in PHP?

© Stack Overflow or respective owner

Related posts about php

Related posts about oop