Code: Select all
$mi=1;
foreach ($months as $month) {
$searchstring="%[^1-9]%d[tsrn][htd] $month %d%[^[]]";
if (sscanf($lsearch,$searchstring, $a, $b, $d, $e)>2) {
if ($d<2000) $d+=2000;
$datesearch="$b/$mi/$d";
$locsearch="$a$e";
}
$mi++;
}$months contains the short names of the months in order (jan,feb,mar etc)
I'm wanting it to pick up things like '5th may' but it isn't doing so.