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

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Preg_match with an array
is there an away to use preg_match with an array?

i want to check a string with an array to s

noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),

a u

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

How to assign a textbox value to PHP variable??
Hi ! Can any one help me out as quickly as possible. As I m new to PHP.
Plz tell me how to assign

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

PHP Session Issue
I'm having an issue with one section on my website dealing with sessions. Now I know that myself and

Place specific image in html page when specific name is typed.
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

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