Is there a PHP function that can extract a phrase between 2 different characters in a string? Something like substr();
substr()
Example:
$String
use this code
$input = "[modid=256]"; preg_match('~=(.*?)]~', $input, $output); echo $output[1]; // 256
working example http://codepad.viper-7.com/0eD2ns