Dae galera To com um problema em fazer o meu php ler o conteudo do banco, e tirar o Chr(13)... acontece que meu php não tá "entendendo" que no retorno do banco, tem uma quebra de linha.. estou usando duas funções, uma para encodar a string, e outra que seria exatamente para pegar o chr, segue: Função para tirar o chr(13) (quebra de linha) function SubAcento($variavel){
$chh=1;
while($chh!=0){
$chh = strpos($variavel, chr(13));
$tam = strlen($variavel);
if($chh>0){
$variavel = substr($variavel,0,$chh).substr($variavel,$chh+2,$tam);
}
}
return $variavel;
}
Função para encodar a string.
function SubAcento2($REMOVE_ACENTOS){
$REMOVE_ACENTOS = str_replace( "à", "à", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "á", "á", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "â", "â", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ã", "ã", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ä", "ä", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "è", "è", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "é", "é", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ê", "ê", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ë", "ë", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ì", "ì", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "í", "í", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "î", "î", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ï", "ï", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ò", "ò", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ó", "ó", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ô", "ô", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "õ", "õ", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ö", "ö", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ù", "ù", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ú", "ú", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "û", "û", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ü", "ü", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "À", "À", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Á", "Á", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Â", "Â", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ã", "Ã", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ä", "Ä", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "È", "È", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "É", "É", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ê", "Ê", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ë", "Ë", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ì", "Ì", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Í", "Í", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Î", "Î", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ï", "Ï", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ò", "Ò", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ó", "Ó", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ô", "Ô", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Õ", "Õ", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ö", "Ö", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ù", "Ù", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ú", "Ú", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Û", "Û", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ü", "Ü", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "ç", "ç", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "Ç", "Ç", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "não", "não", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "não", "não", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "´", "´", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "`", "`", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "¨", "¨", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "^", "ˆ", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "~", "˜", $REMOVE_ACENTOS);
$REMOVE_ACENTOS = str_replace( "\"", """, $REMOVE_ACENTOS);
return $REMOVE_ACENTOS;
} e uso da seguinte forma o resultado da consulta do banco... $Opiniao = SubAcento2($rs['Opi_Opiniao']); $Opiniao = SubAcento($Opiniao); porém não está dando certo, não sei porque...testei a função passando uma string qualquer com <br> dentro dela, e funcionou beleza.... mais na hr de pegar o resultado do banco igual tá acima aí ele não reconhece os <br />, chr(13) e acaba quebrando as linhas... alguém sabe o que pode ser?