When i try to define a variable in __construct it still gives me an error of an undefined varbile. could you help?
<?php
class view {
public $model;
function __construct($url,$root,$model,$common_model,$common_view,$alt_root,$it_selected,$hr_selected,$finance_selected) {
$this->it_selected = $it_selected;
$this->hr_selected = $hr_selected;
$this->finance_selected = $finance_selected;
$this->url = $url;
$this->model = $model;
$this->common_model = $common_model;
$this->common_view = $common_view;
$this->root = $root;
$this->alt_root = $alt_root;
$this->loader();
}
i still recieve it_selected, hr_selected & finance_selected are not defined.