PHP Help

Associate
Joined
18 Oct 2002
Posts
100
Text to convert in file result.txt...
<Date>Oct 31 2006 12:00AM</Date>

File...
<?php
$filename = "result.txt";
$data = preg_replace('/<Date>(.*)<\/Date>/Uie', "'<Date>'. date(\"dmY\",strtotime('$i')) .'</Date>'", file_get_contents($filename));
$fp = fopen($filename, "w");
fwrite($fp, $data);
fclose($fp);
?>

Needs to be converted to dmY
Can't get it to work :(

Plz can anyone point me in the right direction

Thanks in advance
 
Back
Top Bottom