RE: [PHP] Stumped on a function

From: Date: Fri, 21 Jun 2002 08:01:30 +0000
Subject: RE: [PHP] Stumped on a function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103241@lists.php.net to get a copy of this message
> function cleandate($indate) { > str_replace("-", "/", $indate); > return date("F j, Y", strtotime($indate)); > } I suspect that you actually need something like this: function cleandate($indate) { $indate = str_replace("-", "/", $indate); return date("F j, Y", strtotime($indate)); } Although, to be honest, you can probably get away with: function cleandate($indate) { return date("F j, Y", strtotime($indate)); } And, ultimately, you may even find that you're better off just doing the date manipulation in mysql instead and leave it at that. CYA, Dave

« previous php.general (#103241) next »