Yii Framework Forum: nestedset extension problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

nestedset extension problem Rate Topic: -----

#1 User is offline   nnwind 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 26-November 09

Posted 26 November 2009 - 03:45 AM

http://www.yiiframew...sion/nestedset/

cant handle this error:

Undefined index: children
Source File

C:\apache\localhost\www\protected\controllers\SiteController.php(24)

00019:     
00020:     private function printNestedTree($tree)
00021:     {
00022:         //print_r($tree);
00023:         $result = "<strong>".$tree['node']->name."</strong> (".$tree['node']->getLeftValue().",".$tree['node']->getRightValue().")";
00024:         if(is_array( $tree['children'] ))
00025:          {
00026:              $result .= "<ul>";
00027:              foreach($tree['children'] as $key => $child)
00028:              {
00029:                  $result .= "<li>";
00030:                  $result .= $key.": ".$this->printNestedTree($child);
00031:                  $result .= "</li>";
00032:              }
00033:              $result .= "</ul>";
00034:         }
00035:        
00036:         return $result; 


code-from author's example
can somebody help me ?
Thx!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users