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

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should inp

http to https
Hi,

Is there any specific method/condition to move an http:// page to https:// ?

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

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