JamesGMills
Programmer
HI, I have been programming php for years now but I am moving towards Object Orientated php now. I have a question.
I also program in C#.NET and when setting the variables you have to be very strict. So for example this would not work:
class Navigation
{
var $rows_per_page; // used in pagination
var $number_of_results; // total number of rows
var $data_array; // data from the database
function Navigation ()
{
$this->tablename = 'Sections';
$this->dbname = 'jgmcmsc_cms';
}
It would not work because I am trying to put a value into $this->tablename which has not been declared above.
However it seems to still work in php, is this something that more strict in later version of php?
Cheers
------------------------
I also program in C#.NET and when setting the variables you have to be very strict. So for example this would not work:
class Navigation
{
var $rows_per_page; // used in pagination
var $number_of_results; // total number of rows
var $data_array; // data from the database
function Navigation ()
{
$this->tablename = 'Sections';
$this->dbname = 'jgmcmsc_cms';
}
It would not work because I am trying to put a value into $this->tablename which has not been declared above.
However it seems to still work in php, is this something that more strict in later version of php?
Cheers
------------------------