$string = ‘var togo = “gowentgone”’;
how can i grab the text with preg_match_all?
preg_match_all(‘/“(.*)”/i’, $string, $result) ;
$string = ‘var togo = “gowentgone”’;
how can i grab the text with preg_match_all?
preg_match_all(‘/“(.*)”/i’, $string, $result) ;
You can safely drop the /i at the end. " is just a character; it doesn’t have a lowercase and uppercase variant ![]()
Agreed! Copy n paste ![]()
$string = 'var togo = "gowentgone";
var togo1 = "gowentgone1";
var togo2 = "gowentgone2"';
preg_match_all('/"(.*?)"/i', $string, $matches) ;
print_r($matches[1]);