I had a application working fine, then the server people upgraded to php5, of course now certain things dont work (well didn't) I have managed to fix all the issues apart from this one
$tstamp = mktime($hour,$minute,$second,$month,$day,$year);
switch ($format):
case "1":
$sDate = date("l jS F Y",$tstamp);
break;
case "2":
$sDate = date("d/m/y",$tstamp);
break;
case "3":
$sDate = date("d/m",$tstamp);
break;
case "4":
$sDate = date("j M Y",$tstamp);
break;
case "5":
$sDate = date("D jS M",$tstamp);
break;
default:
$sDate = date("d/m/y H:i",$tstamp);
break;
endswitch;
return $sDate;}
This is genorating a error message saying
Fatal error: Cannot redeclare date_format()
Can someone please show me what needs changing?