-Array ( [0] => $this->bbcode_second_pass_code('', ' public function actionGenerate() { $authItems = $rows = Yii::app()->db->createCommand() ->select('au.name') ->from('authitem au') ->leftJoin('authitemchild parents', 'parents.child = au.name') ->where('parents.id is null') ->queryAll(); $items = array(); foreach($authItems as $authItem){ $items[$authItem['name']] = $this->getChilds($authItem['name']); } $text = ''; //можно переделать все в одну рекурсию и добавить проверку на циклы $file = $this->printData($items, 1, $text); } public function printData($data, $level, $text) { foreach($data as $key => $value){ if($value) { $text .= "\r\n". str_pad('', $level, '*', STR_PAD_RIGHT) . ' *' . $key . '*'; $text = $this->printData($value, $level+1, $text); } else { $text .= "\r\n". str_pad('', $level, '*', STR_PAD_RIGHT) . ' ' . $key; } } return $text; } public function getChilds($name) { $childList = Yii::app()->db->createCommand() ->select('child') ->from('authitemchild') ->where('parent = :parent', array(':parent' => $name)) ->queryAll(); if(!$childList){ return false; } $childs = array(); foreach($childList as $item){ $childs[$item['child']] = $this->getChilds($item['child']); } return $childs; } ') )
( ! ) Parse error: syntax error, unexpected 'au' (T_STRING), expecting ',' or ')' in /var/www/vinternetah.ru/ru/includes/bbcode.php(124) : eval()'d code on line 4