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>
Did you know?Explore Trending and Topic pages for more stories like this.
<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

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

Preserving user-entered linebreaks
Hi, I'm building a web 2.0 thingy from scratch and I wanna display text which users input. It's all

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are

help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?

I was thinking s

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