Jump to content

hoangthi

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by hoangthi

  1. My language is Vietnamese. UTF-8. Please help me.
  2. This is my simply code.. $contentp="Trao đổi với phóng viên Vietnam+ trưa 10/8, ông Đặng Vũ Tuấn Sơn, Chủ nhiệm Câu lạc bộ thiên văn học trẻ Việt Nam cho biết, một trận mưa sao băng thuộc loại đẹp nhất trong năm 2010 sẽ xảy ra trên bầu trời, vào rạng sáng ngày 13/8. Trận mưa sao băng này hứa hẹn sẽ đem lại sự mãn nhãn cho người yêu thiên văn, bởi thời điểm diễn ra trùng với ngày đầu tháng âm lịch tại Việt Nam. Do đó, những vệt sáng của sao băng không bị ảnh hưởng bởi ánh trăng. Tuy nhiên, các chuyên gia cho hay, muốn quan sát mưa sao băng, người xem phải kiên nhẫn. Theo suy đoán, trung bình một phút có khoảng 2 vệt sao băng, nhưng cũng có lúc bầu trời sẽ không xuất hiện sao băng, hoặc xuất hiện với tần xuất dày hơn"; // This is Vietnamese. mysql_query("insert into mybb_posts(message) VALUES('$contentp')"); // This is code to insert into database. And this is result on my database: My message is errored, i CANNOT read it.... please help me. If you cannot see my code. Please view my attach file Thanks in advance... [attachment deleted by admin]
  3. I want to Get Each Value of Content by using Loop "for"
  4. Please Help me Fix my code. Because I use Loop "For" for this code.
  5. This is the Code i am using. This is show error: Fatal error: Call to a member function item() on a non-object in /home/domain/public_html/forum/file/Test.php on line 35 <?php $xml=("http://www.vn-zoom.com/external.php?type=RSS2&forumids=77"); $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); //get elements from "<channel>" $channel=$xmlDoc->getElementsByTagName('channel')->item(0); $channel_title = $channel->getElementsByTagName('title') ->item(0)->childNodes->item(0)->nodeValue; $channel_link = $channel->getElementsByTagName('link') ->item(0)->childNodes->item(0)->nodeValue; $channel_desc = $channel->getElementsByTagName('description') ->item(0)->childNodes->item(0)->nodeValue; //output elements from "<channel>" echo("<p><a href='" . $channel_link . "'>" . $channel_title . "</a>"); echo("<br />"); echo($channel_desc . "</p>"); //get and output "<item>" elements $x=$xmlDoc->getElementsByTagName('item'); $i=1; // $i = 1 to n (I use For here). { $item_title=$x->item($i)->getElementsByTagName('title') ->item(0)->childNodes->item(0)->nodeValue; $item_link=$x->item($i)->getElementsByTagName('link') ->item(0)->childNodes->item(0)->nodeValue; $item_desc=$x->item($i)->getElementsByTagName('description') ->item(0)->childNodes->item(0)->nodeValue; // If i remove this, it will work....//////////// $item_content=$x->item($i)->getElementsByTagName('content') ->item(0)->childNodes->item(0)->nodeValue; ///////////////////////////////////////////////////// echo ("<p><a href='" . $item_link . "'>" . $item_title . "</a>"); echo ("<br />"); echo ($item_desc . "</p>"); echo ("<br />"); echo ($item_content . "</p>"); } ?> Please help me Fix this Code to Get content of Tag Name <content:encoded> Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.