我有串这样的:PHP - 转换代码段从字符串到HTML字符
<a href="http://google.com"> link </a>
[code lang="html" anotherargument="foo"...]
<a href="http://google.com"> link </a>
[/code]
我如何转换[code...]
和[/code]
之间包裹HTML字符的代码?
这样的:
<a href="http://google.com"> link </a>
[code lang="html" anotherargument="foo"...]
<a href="http://google.com"> link </a>
[/code]
谢谢。你知道我该怎么做'
'吗? – Alex 2011-04-02 10:43:05将模式字符串更改为'|
|我' – chriso 2011-04-02 11:29:29不工作:( – Alex 2011-04-02 22:56:07