date function help

Posted on 16th Feb 2014 by admin

i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>

<body>
<?php
$db = mysql_connect("localhost");
mysql_select_db("test", $db);

$query = "select * from date";
$result = mysql_query($query);
while($record = mysql_fetch_assoc($result))
{
echo $record['date']."

";
}
?>
</body>
</html>
through above code i am trying to echo date from database. but the problem is it echoes in this format "year month day" but i want it in "day month year" format

how can i do this?

Other forums