If i have the string [link="*"]
where * is a wildcard how could i then use php to replace the string with <a href="*">
where * is the same value as before?
Is preg_replace the best way to do this?
Thanks, any help appreciated!
preg_replace('~\[link="(.*?)"\]~', '<a href="$1">', $text);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With