$rw = $db->query( "SELECT id,name FROM dle_category WHERE parentid='{$_POST['id']}' ORDER by id ASC" );
while ($row = $db->get_row($rw)) {
$row['name'] = iconv('windows-1251', 'UTF-8', $row['name']);
$v = array($row['id'] => $row['name']);
}
echo json_encode($v);