Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function parse_array($arr){
- if(!@$arr["file"] ) {
- $result = "";
- foreach($arr as $one)
- $result .= $this->parse_array($one);
- }
- else{
- $result = file_get_contents("templates/".$arr["file"].".tpl");
- foreach($arr["keys"] as $key => $one){
- if(is_array($one)){ /////is tpl
- $tmp = $this->parse_array($one);
- $result = str_replace("{".strtoupper($key)."}", $tmp, $result);
- }
- else /////is value
- $result = str_replace("{".strtoupper($key)."}", $one, $result);
- }
- }
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement