I am using PHP (5.2.13) with IIS6 and CodeIgniter framework, and I am handling problems with print data from database with html_entities_decode. For example:
<?php
echo html_entity_decode($somedata,ENT_QUOTES,"UTF-8");
echo "Hello";
?>
$somedata is $data["informativo"][0]->texto and texto is some html (html mix with xml sometimes) codes.
The problem is that the echo "Hello" is not showing, actually the $somedata does not print everything. All buffer after that echo is not showing as well.
Could be this problem with Output class from CodeIgniter?
I found that actually the query isn't bringing everything. The Database is MSSQL Server 2005 and the field texto is a long text.
The code of the query is:
<?php
public function getInformativo($idInformativo)
{
$sql = "SELECT titulo,texto,secao,usu_atualizacao,data_atualizacao,inativo
FROM PI_Informativo
WHERE idInformativo = '".$idInformativo."'";
return $this->db->query($sql)->result();
}
?>
The texto field only brings a part of that long text. The sql driver is ODBC.
But why the rest of php after the echo of $somedata does not showing? In the controller after that any loaded view are missing.
I Just found the answer. My connection with Database uses ODBC, and I need to specify a bigger long byte size with:
ini_set("odbc.defaultlrl", "100K");
html_entity_decode()inside of view?html_entity_decode()does, but please edit question and provide$somedata, what is in it?