\n", true); ec" /> \n", true); ec" /> \n", true); ec"/>

Echo nlb2r htmlspecialchar

123 views Asked by At

Want to use nl2br and htmlspecialchar. Right now result will say nl2br before the content.

     $contentfix = wordwrap($content, 100, "<br />\n", true);

     echo '<div style="color:white;font-size:20px;/*font-family:play ;">'.nl2br 
    ,htmlspecialchars ($contentfix, ENT_QUOTES).'</div> ';
1

There are 1 answers

1
Naltamer14 On BEST ANSWER

Firstly: you can't call functions comma-seperated. Secondly: you have an unclosed multiline comment.

Try this:

$contentfix = wordwrap($content, 100, "<br />", true);
echo '<div style="color:white; font-size:20px;">'. nl2br(htmlspecialchars($contentfix, ENT_QUOTES)) . '</div>';