I have a problem with my OOP.
Why does following code produce a parse.
Check out the code at http://www.frofro.f2s.com/BloodBowl/extend.phps
and the error it produces at http://www.frofro.f2s.com/BloodBowl/extend.php
Thanks!
/Staffan
I think your second class should be as
subClass extends mySQL {
function subClass { $this->mySQL ("myHost, "myUser", "myPass", "myDB"); } }
14 class subClass extends mySQL { 15 var $mySQLObject; 16 17 $this->mySQLObject = new mySQL("myHost, "myUser", "myPass", "myDB"); 18 }
This is incorrect. You cannot have standalone code inside a class. All code must be contained in a method.
Thank you! I got it work now!