Is there an equivalent to a member-wise initialization list in PHP?

affisdist

New Member
I'd like to start with a little background, in case anyone has any better ideas for design.I'm looking to create a database class that connects to a database at construction. I would use functions to call the database, to get what I want. The database connection would be closed at destruction.Since I'm connecting in construction, I'd like to use some properties as part of the mysql_connect... but they're not initialized until construction. I was wondering if there is a way to initialize member variables like a member-wise initialization list in C++, but in PHP.Thanks in advance for any help, all-mighty google wasn't much help in this case.-Theino
 
Back
Top