в общем трабл такой, троит первый комментарий добавленный в пост. тоесть в бд 1 а на сайте выводит какую-то ботву код вывода скрипта PHP: $query = mysql_query("SELECT * FROM ******* WHERE `unswer`='".$_GET['novost']."'"); $dataset = array(); while($check = mysql_fetch_array($query)) { $autor = $check['autor']; $data = $check['data']; $mama = $check['id']; $parent = $check['postnumb']; if ($parent == 0) $parent = null; $dataset['id'] = $check['id']; $dataset[$check['id']]['mama'] = $mama; $dataset[$check['id']]['data'] = $data; $dataset[$check['id']]['parent'] = $parent; $dataset[$check['id']]['text'] = $check['comment']; } $tree = mapTree($dataset); display_tree($tree); function mapTree($dataset) { $tree = array(); foreach ($dataset as $id=>&$node) { if ($node['parent'] === null) { $tree[$id] = &$node; } else { if (!isset($dataset[$node['parent']]['children'])) $dataset[$node['parent']]['children'] = array(); $dataset[$node['parent']]['children'][$id] = &$node; } } return $tree; } ?> <script type="text/javascript"> $(document).ready(function() { $(".form_answer").hide(); $(".show_form_answer").click(function() { $(this).parent().find('.form_answer').slideToggle(); }) }) </script> <?php function display_tree($nodes, $indent=0) { if ($indent >= 20) return; foreach ($nodes as $node) { echo '<table><tr>'; $nbsp = $indent * 30; echo '<td width="'.$nbsp.'px" align="left"></td>'; echo '<td algin="left">'.$node['text'].'</td>'; echo "</tr><tr><td colspan='3'>"; echo ' <tr><td ><table width="'.$nbsp.'px" ></table></td><td style="width:100%; padding-bottom:10px;"><a href="" class="show_form_answer" onclick="return false;">Ответить</a> <form class="form_answer" action="http://vtrigazety.ru/addcom.php?post='.$_GET['novost'].'&child='.$node['mama'].'&home='.$_GET['blog'].'" method="post"><table style="width:100%;"><tr><td> <input type="hidden" id="'.$node['id'].'"> <textarea id="text" name="text" style="width:100%; height:200px; text-align:left;"></textarea></td></tr><tr><td> <input type="submit" value=" добавить " /></td></tr></table> </form></td></tr>'; echo "</td></tr></table>\r\n"; if (isset($node['children'])) display_tree($node['children'],$indent+1); } } пример косяка http://jquery.vtrigazety.ru/&novost=1 пример с несколькими комментариями http://jquery.vtrigazety.ru/&novost=4 Удевительно то что даже призраку можно ответить бд