Tuesday, May 1, 2012

TreeBehavior


Hi,

im building a nested tree inside loop, like this:

$keys = array('key-1', 'key-2', key-3, '....' ......... ....... ..........); //many keys(300) !

foreach($keys as $key){
            $data['Category']['name'] =  $key;
            $this->Category->create();
            $this->Category->save($data);
}

problem: on some rows i get the same left and right! Why? any idea?!?

No comments: