remove square brackets from string php

Solutions on MaxInterview for remove square brackets from string php by the best coders in the world

showing results for - "remove square brackets from string php"
Luis
07 Jan 2018
1str_replace( array('[',']') , ''  , $string )
Niko
08 Jan 2019
1
2$output = preg_replace( '/\[\[(\w+)\[\]/' , '$1' , $string );
3
Jackie
17 Jan 2020
1$repl = str_replace(array('[[', ']]'), '', '[[link_to_page]]');// "link_to_page"
Erik
11 Apr 2016
1
2preg_match_all('/\[\[([^\]]+)\]\]/', $yourText, $matches);
3foreach($matches as $link) {
4   echo $link[1];
5}
6
Sid
23 Apr 2017
1$string = str_replace(array('[[',']]'),'',$string);
Stefania
19 Feb 2019
1$repl = preg_replace('/(\[|\]){2}/', '', '[[link_to_page]]');// "link_to_page"