hey there, is this ok?
class MyClass
{
var $start;
var $finish;
function MyClass($start, $finish)
{
$this->start = $start;
$this->finish=$finish ,
$this->sensor_array = get_sensor_arra y();
}
function get_sensor_arra y
{
so some stuff to populate $this->sensor_array ;
return array($this->sensor_array );
}
}
another question i have,
why do i need to declare variables with the var if i can declare them
in the constructor without it ?
just a couple of questions.
if you have read this far, thanks for your time
sk
class MyClass
{
var $start;
var $finish;
function MyClass($start, $finish)
{
$this->start = $start;
$this->finish=$finish ,
$this->sensor_array = get_sensor_arra y();
}
function get_sensor_arra y
{
so some stuff to populate $this->sensor_array ;
return array($this->sensor_array );
}
}
another question i have,
why do i need to declare variables with the var if i can declare them
in the constructor without it ?
just a couple of questions.
if you have read this far, thanks for your time
sk
Comment