I have
$a = day
$b= month
$c=year
Now i want to show the date in the format $a $b $c
How to use the time function? because when i echo "date($a $b $c)"; it gives me errors. How to echo it right?
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
That would just echo current date, current month and current year bro, i want to echo a specific date, month and time whose values are there in the $a , $b and $c variables
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
morse wrote:
That would just echo current date, current month and current year bro, i want to echo a specific date, month and time whose values are there in the $a , $b and $c variables
dude, the date() works with unix time stamp. So if u want 2 echo a specific dat, u'd avta knw its correct timestamp in seconds and do sumot like:
echo date("d m y",$tmstamp);
NOTE: you can use strtotime() to convert string to time. Read php.net for more info. . .
Php does has a functionality to echo day, date, month and year in a specific format if we provide the variables correctly, but for some reason am unable to echo proper results, i end up echoing Wednesday 31st december for all the different variable values. I did read the manual and they havent explained php date and time functions that very well.
To undastand wot i sed earlyer i'l explain quickly d date function. It accepts 2 parameters.
First, the format string, this tells the date function how to format the date its bring. The second parameter, this specifies the time u want to format in UNIX timestamp (seconds since 1, jan 1970, i guess) if left blank, date() uses d current date time stamp aka time() bt if u already ava date u want to output, just specify it as d 2nd parameter(in timestamp).
U cud generate a timestamp urself.