Menu
Home
Recent Posts
Convert date format yyyy-mm-dd to dd-mm-yyyy
6:40 AM
0
Share
Use
strtotime()
and
date()
:
$originalDate
=
"2010-03-21"
;
$newDate
=
date
(
"d-m-Y"
,
strtotime
(
$originalDate
));
(see
strtotime
and
date
docs on the PHP site).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Development and programming answers
Search articles
Popular Posts
Security Article: How making secure HASH and Salt for password in PHP
The objective behind hashing passwords is simple: preventing malicious access to user accounts by compromising the database. Dont'...
Applying CSS to an iframe
There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style o...
Debug PHP applications: How to get useful errror messages
For syntax errors, you need to enable error display in the php.ini. By default these are turned off because you don't want a "custo...
How to: Check checkbox state with jQuery
jQuery 1.6+ Use the new .prop() function: $ ( '.myCheckbox' ). prop ( 'checked' , true ); $ ( '.myCheckbox' ...
No comments:
Post a Comment