hi,
I'm working on a script that uses a calendar... for that, I have variable like $m, $d, $y to represent month, day and year... But apparently php just throws the zero away, and I need the zero later in the script...
so if I were to say:
$d = "02";
$m = "02";
$y = "2002";
and I would like to print that:
print ("$d$m$y"
;
I would get 222002
But I really need 02022002...
I hope you understand what I mean...
with date() you can actually leave the zero's out of it:
m - month; i.e. "01" to "12"
n - month without leading zeros; i.e. "1" to "12"
And I use the 'm' when I get the date... but the zero is just gone...
Can anyone help?
Thanx,
math
I'm working on a script that uses a calendar... for that, I have variable like $m, $d, $y to represent month, day and year... But apparently php just throws the zero away, and I need the zero later in the script...
so if I were to say:
$d = "02";
$m = "02";
$y = "2002";
and I would like to print that:
print ("$d$m$y"
I would get 222002
But I really need 02022002...
I hope you understand what I mean...
with date() you can actually leave the zero's out of it:
m - month; i.e. "01" to "12"
n - month without leading zeros; i.e. "1" to "12"
And I use the 'm' when I get the date... but the zero is just gone...
Can anyone help?
Thanx,
math