Добрый день, подскажите пожалуста как немного поправить скрипт, который уже работает но с багами. 1) Не отображает русский текст (((( 2) Очень надо ноды строить только для определенных ячеек, а не для всех. Вот то, с чем я щяс работаю. Это моя дб: Код (Text): -- phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 16, 2008 at 02:59 PM -- Server version: 5.0.51 -- PHP Version: 5.2.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `studio` -- -- -------------------------------------------------------- -- -- Table structure for table `picturegal_items` -- CREATE TABLE IF NOT EXISTS `picturegal_items` ( `id` int(11) NOT NULL auto_increment, `title` text NOT NULL, `title_ru` text NOT NULL, `img` varchar(255) NOT NULL, `thmb` varchar(255) NOT NULL, `desc` text NOT NULL, `desc_ru` text NOT NULL, `category` text NOT NULL, `created` time NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Dumping data for table `picturegal_items` -- INSERT INTO `picturegal_items` (`id`, `title`, `title_ru`, `img`, `thmb`, `desc`, `desc_ru`, `category`, `created`) VALUES (1, 'My title gose hire', 'qwerty', 'contents/gallery/category1/img1.jpg', 'contents/gallery/category1/tmb1.jpg', 'My description test is hire My description test is hire My description test is hire My description test is hire My description test is hire My description test is hire My description test is hire ', 'Описание на русском', 'category2', '14:31:53'); Вот так выглядит мой php: Код (Text): <?php //phpinfo(); if(!$dbconnect = mysql_connect('localhost', 'root', '')) { echo "Connection failed to the host 'localhost'."; exit; } // if if (!mysql_select_db('studio')) { echo "Cannot connect to database 'test'"; exit; } // if $table_id = 'picturegal_items'; $query = "SELECT * FROM $table_id order by 'created'"; $dbresult = mysql_query($query, $dbconnect); // create a new XML document $doc = new DomDocument('1.0'); // create root node $root = $doc->createElement('images'); $root = $doc->appendChild($root); // process one row at a time while($row = mysql_fetch_assoc($dbresult)) { // add node for each row $occ = $doc->createElement('image'); $occ = $root->appendChild($occ); // add a child node for each field foreach ($row as $fieldname => $fieldvalue) { $child = $doc->createElement($fieldname); $child = $occ->appendChild($child); $value = $doc->createTextNode($fieldvalue); $value = $child->appendChild($value); } // foreach } // while // get completed xml document $xml_string = $doc->saveXML(); echo $xml_string; ?> Зарание спасибо всем учасникам!