doushenken2833 2018-04-13 11:50 采纳率: 0%
浏览 38
已采纳

Echo nlb2r htmlspecialchar

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

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

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

1条回答 默认 最新

  • doutuichan2681 2018-04-13 12:05
    关注

    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>';
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?