date function help


Posted on 16th Feb 2014 07:03 pm 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?

No comments posted yet

Your Answer:

Login to answer
259 Like 48 Dislike
Previous forums Next forums
Other forums

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

Parse error: syntax error, unexpected $end in
hello,
i receive the error :Parse error: syntax error, unexpected $end in C:xamppxampphtdocsh

I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.


for ($i=0; $i<10

Hit counter updating once per IP - IP HIT COUNTER
I have a hit counter, for the amount of views on a tutorial.
It'll do the query and then do..

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash