I am using the following code to change the format in the date mm / dd / yy Date of return ('FD, Y', strontem ('{$ month} / {$ day} / {$ year} '));
In my database, I have a
$ month ,
$ day and
$ year as The stored values are a
INT
When I add the variable to the date function, the output is incorrect. I'm getting an unexpected date I have the date in the system, but the output is
December 31, 1969 .
Any ideas?
I think there is only one quotation around the string in this problem strotom
put in single quotes paras and variable values, it will actually be literal. You want to use a pair
$ month = 1; $ Day = 2; $ Years = 2000; Echo Date ('FD, Y', Stromathem ("$ Month / $ Day / $ Year")); Echo '{$ month} / {$ day} / {$ year}'; / / Output:
January 02, 2000 {$ month} / {$ day} / {$ year} / ($ $) ; $ I ++) for the echo date ('FD, for, $ i & lt; to count
EDIT Y' , Strotom ($ month [$ i]. '/'. $ Day [$ i]. '/'. $ Year [$ i])))). '& Lt; Br / & gt; ';
Comments
Post a Comment