Retirez les crochets de la chaîne PHP
str_replace( array('[',']') , '' , $string )
Sleepy Squirrel
str_replace( array('[',']') , '' , $string )
$repl = preg_replace('/(\[|\]){2}/', '', '[[link_to_page]]');// "link_to_page"
$string = str_replace(array('[[',']]'),'',$string);
$output = preg_replace( '/\[\[(\w+)\[\]/' , '$1' , $string );
preg_match_all('/\[\[([^\]]+)\]\]/', $yourText, $matches);
foreach($matches as $link) {
echo $link[1];
}
$repl = str_replace(array('[[', ']]'), '', '[[link_to_page]]');// "link_to_page"