class Template { public $temp; public $stemp; public $track; public $optype; public $arr_elem; public $temp_elem; public $path = "templates/"; public $temp_name = "default"; public $ext = ".tpl"; public function render_page($tpl, $arr_data="", $directory="") { $directory = ($directory)? $directory."/" : $directory; $this->track = $this->path.$this->temp_name."/".$directory.$tpl.$this->ext; return $this->temp; if($this->temp) { foreach($arr_data as $elem => $val) { { $elem = $this->arr_elem[0]; foreach($val as $attr => $op) { { switch($this->arr_elem[1]) { case "options": $this->optype .= "<$this->temp_elem value=\"$attr\">$op</$this->temp_elem>"; break; case "inputs": $this->optype .= "$op<$this->temp_elem name=\"$attr\" />"; break; } } else $this->optype .= $op; } $this->stemp = $this->optype; } else $this->stemp = $val; } return $this->temp; } else return $this->track." not found<br />"; } public function __desctruct() { }
Wywala mi 1 błąd w 42 linijce i 6 błędów w 45.
Nie mam pojęcia co jest nie tak.