说我从textarea
编码很酷
编程正在编码
绿屏
我可以用bl2br打印出来,不过我打算将它打印出来的样子是这样的:
<div class="coding">Coding is cool</div><div class="green"><?php //php query doing the same, but for another textbox ?></div><div class="one-more-class"></div>
<div class="coding">Programming is coding</div><?php //php query doing the same, but for another textbox ?></div><div class="one-more-class"></div>
<div class="coding">Green screens</div><?php //php query doing the same, but for another textbox ?></div><div class="one-more-class"></div>
输入必须来自textarea,而不是来自单独的文本框。我不会进入更复杂的jQuery实现。说到这个,没有Javascript这个 - 我相信它可以用PHP完成。
答案 0 :(得分:2)