// create a string
$string = '+7';
// try to match the beginning of the string
if(preg_match("{-15 to +12}", $string))
{
// if it matches we echo this line
return {strip all the + sign}
echo 'its a valid gmt time';
}
else
{
echo 'not valid gmt time';
}
Question:
please see the first {} on preg_match, is how can we do that ? im new on regex and i just dont know where to start
on the second {} can we somehow strip the + sign by useing regex ?
is the gmt range is right ? -14 to +12 ( well thats what i see on http://www.php.net/manual/en/timezones.others.php )
Thanks