Help make a replacement with [url= https://siter.com ]Таракан[/url] On <a href="https://site.com">Таракан</a> With the help of preg_replac e

PS I just don’t know how to make a regular season

  • 2
    markdown immediately put and bring everyone happiness with another service that supports this markup language. - etki
  • I don't want = ( - MadKeks pm

1 answer 1

Something like this,

 preg_replace('/\[url=(.+?)\](.+?)\[\/url\]/', '<a href="\1">\2</a>', $MY_TEXT);