Hi, I've got this DATETIME result from MySQL, and I want to trim it down so this: 2003-09-15 10:00:00 Becomes this: 20030915100000 So basically just take everything out except integers. I would like to do this on the PHP side and not MySQL side. An example of PHP code to do this would be greatly appreciated. Thanks!
assuming you can set that value to a variable, you can do this
<? $string = "2003-09-15 10:00:00"; $string = str_replace("-", "", $string); $string = str_replace(" ", "", $string); $string = str_replace(":", "", $string); echo $string; ?>