Probably asked many times but I am hard-headed.
I have the following class to manage a MySQL db.
class blog {
function show ($mysqli) {
// Code working on $mysqli here
}
}
Since I will be using $mysqli in many functions inside of this class I read that I can create constructors in order to pass the $mysqli variable to the class and use it inside of each function so I can do something like:
$blog = new blog($mysqli);
$blog -> show();
Is this possible?