[code]
echo str_replace(array('(', ')'), '', "(test) i'm test"); exit;
[run]
(test) i'm test
I want to remove brackets from this text, but it not working?
Advertisement
Answer
This code removes parentheses (
, )
from the following string:
(test) i'm test"
$string = "(test) i'm test"; echo str_replace(array( '(', ')' ), '', $string);
The results after using the str_replace() function:
test i'm test"