Well i changed it as you mentioned and i now have...
Code: Select all
for($line=0;$line<count($array);$line++){
$string=$array[$line];
preg_match('#[\d]{2}/[\d]{2}/[\d]{4}#', $string, $match);
if (!empty($match))
$rdate[] = strtotime($match);
}
print_r($rdate);
Which gives a result of:
Array ( [0] => -1 )
I have also noticed that by running the following peice of code, the preg_match does actually find the right line, however it always comes back with -1.
Code: Select all
for($line=0;$line<count($array);$line++){
echo "<PRE>",HtmlSpecialChars($array[$line]),"</PRE>\n";
$string=$array[$line];
preg_match('#[\d]{2}/[\d]{2}/[\d]{4}#', $string, $match);
if (!empty($match))
$rdate[] = strtotime($match);
}
print_r($rdate);
So now the only issue i am having is that it finds the correct line, however it doesn't display the capture text.
I am not sure what i am doing wrong here.
Cheers
Freddy