dougou6213 2009-12-15 18:56
浏览 12
已采纳

如何在PHP中“撤消”这个小函数?

I am using this to adapt my text which then gets inserted into a mysql db:

$ad_text=nl2br(wordwrap($_POST['annonsera_text'], 60, "
", true));

When users wish to change their posting, they click a link on my page, and a form opens. In this form, the textarea where I fetch the info from mysql, I am displaying the text again. Only problem is, the text itself contains '<br>' tags. That is, it shows up EXACTLY as it looks in the mysql table field.

How can I undo the function above so that the <br> tags are removed again? Thanks

  • 写回答

3条回答 默认 最新

  • dousi6192 2009-12-15 19:01
    关注

    Why not insert your clean unmodified text into the database, then html-ify it only when displaying?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题