Hi
i am using a function to convert data format
from :yyyy-mm-dd hh:mm:ss
to: dd/mm/yyyy hh:mm:ss
it was working in a server with register globals on and do not work on a server with registers globals off is there any reason to not work on the server with registers globalks off? is there any workaround?
function _stodt_old($str) {
$aStr = preg_split('/ /', $str, -1, PREG_SPLIT_OFFSET_CAPTURE);
$d = $aStr[0];
$t = $aStr[1];
$aD = preg_split('/-/', $d, -1, PREG_SPLIT_OFFSET_CAPTURE);
if( $aD[2]!=""){ //empty date?
$datetime = $aD[2] . "/" . $aD[1] . "/" . $aD[0] . " " . $t;
} else {
$datetime = "";
}
return $datetime;
}
thank“s in advance