<?php $text = 'some text [BUTTON link="www.test.com" label="Click here"] some text'; echo preg_replace( '/\[button link="([^"]+)" label="([^"]+)"]/i', '<a href="$1">$2</a>', $text );
You have javascript disabled. You will not be able to edit any code.