finish nested comment implementation
This commit is contained in:
parent
0936de7c1d
commit
b4ab9a5111
6 changed files with 279 additions and 254 deletions
|
@ -28,7 +28,8 @@ class Comment
|
|||
$comments[] = $this->value;
|
||||
|
||||
foreach($this->children as $child) {
|
||||
$comments[] = $child->getContent($level + 1);
|
||||
//$comments[] = $child->getContent($level + 1); //produces nested result array.
|
||||
$comments = array_merge($comments, $child->getContent($level + 1)); //produces flat result array.
|
||||
}
|
||||
return $comments;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue