PHP在两个分隔符和分隔符之间爆炸而不会丢失

问题描述

如何在定界符“ [”之间爆炸字符串,但我希望定界符不会丢失 例如,我有这样的字符串

$str = "i want to show you my youtube channel : [youtube id=12341234] and my instagram account : [instagram id=myingaccount213]

我想要这样的结果

  [0]=>
  string(61) "i want to show you my youtube channel : [youtube id=12341234]"
  [1]=>
  string(68) "and my instagram account : [instagram id=myingaccount213]"

如果我使用$tes = explode("]",$content);,则“]”会丢失

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)