用php删除[]标签

Pogodba o zaposlitvi (v nadaljevanju PZ) je ena izmed pogodb, za katero zakon zahteva posebno obličnost ter tudi natančno določa, kdo so lahko stranke PZ.[/B] [CUT] Zak..

How to remove all [] tags in php. So [/B] [CUT],...

You need to use regex for this, using preg_replace:

$string = 'foo [/B] [CUT] bar';
$pattern = '/\[\/?[A-Z]+\]/';
$processed = preg_replace($pattern, '', $string);

$processed then contains

'foo   bar'

This assumes the tags will always contain capital letters and may have a single / in front of the tag name.

Use str_replace

str_replace (array('[', ']'), '', your text here)

I thisnk you have to use preg_replace

to do that...