class Sections {
public $dataGet = array();
var $errors = array();
public function __construct(){
$this->dataGet = ($_POST);
//print $this->dataPost['subject'];
}
public function sectionShow($section){
if(!empty($section)){
switch($section){
case 'clients':{
print "klienci";
}
break;
case 'levels':{
print "poziomy";
}
break;
default:{
print "domyslnie";
}
break;
}
}else {
print "Wybierz sekcje";
}
}
};
$show = new Sections;
$show->sectionShow('levels');
?>
Czy nie powinn oto wyglądać inaczej, niż switch ?
Dodam, że sekcje mam statyczne i do tego panel administracyjny, nie tworzę cms-a.