PHP: How to get <br/> working in a simplexml_load_file() var.
        Posted  
        
            by daviddarx
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by daviddarx
        
        
        
        Published on 2010-05-10T13:45:40Z
        Indexed on 
            2010/05/10
            13:54 UTC
        
        
        Read the original article
        Hit count: 168
        
Hi everybody!
I am loading an xml in php via simplexml_load_file().
I load the file with that:
$xml = simplexml_load_file('flash/datas/datas.xml');
And the access my content like that:
$descText = $xml->aboutModule->chocolaterie->desc
The text from desc is well registred in my $descText, but all the <br/> of the text disappear... So my long text is on a single line, not so good :-/
Do you know how to solve that? Is there a special traitement to do one the $xml var? Or someting else?
Thank you in advance for your help!
© Stack Overflow or respective owner