【发布时间】:2016-05-27 02:17:10
【问题描述】:
我有这样的字符串
<span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">I want replace this text to other text</span>
<span style="font-size: 18pt; font-family: arial, helvetica, sans-serif;">I want replace this text to other text</span>
我想用PHP来制作
<span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">I want replace <a href="#">this text</a> to other text</span>
<span style="font-size: 18pt; font-family: arial, helvetica, sans-serif;">I want replace this text to other text</span>
我只希望文本具有跨度样式 font-size:11pt 替换 请帮帮我 谢谢
【问题讨论】:
-
您在替换时遵循的模式是什么?
-
是的,我可以尝试,但您需要指定替换的位置
href..它不能在任何地方..文本中必须有一些特定的点您想要替换它 -
如果span标签后面的文字是“我想要”,你能帮帮我吗
-
你想在
href中保留多少? -
见here