minifarkan
minifarkan

Reputation: 3

Echo nlb2r htmlspecialchar

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> ';

Upvotes: 0

Views: 122

Answers (1)

Naltamer14
Naltamer14

Reputation: 317

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>';

Upvotes: 1

Related Questions