|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-04-21 20:41 UTC] cataphract@php.net
-Status: Open
+Status: Not a bug
[2012-04-21 20:41 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 10:00:01 2025 UTC |
Description: ------------ The first call of htmlentities works OK, but, the next call always return a empty string. When I print_r($res), all values are printed OK Test script: --------------- mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($database); $sql = "select noticia_id,noticia_datacad,noticia_assunto,noticia_titulo from tab_noticia order by noticia_data desc,categoria_id desc,noticia_id desc limit 15;"; $qry = mysql_query($sql); $res = mysql_fetch_row($qry); while ($res) { $title = htmlentities($res[3]); $subject = htmlentities($res[2]); $data = $res[1]; echo "\t\t\t\t\t<item>\r\n"; echo "\t\t\t\t\t\t<title>".$titulo."</title>\r\n"; echo "\t\t\t\t\t\t<description>".$assunto."</description>\r\n"; echo "\t\t\t\t\t\t<lastBuildDate>".$data."</lastBuildDate>\r\n"; echo "\t\t\t\t\t\t<link>http://www.the.site/news.php?id=".$id."</link>\r\n"; echo "\t\t\t\t\t</item>\r\n"; $res = mysql_fetch_row($qry); } // end while mysql_close();