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
How to migrate applications for iphone 5 resolution
The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). To make applications "universal" for b...
Create a remote branch GIT
First, you create your branch locally git checkout -b your_branch The remote branch is automatically created when you push it to the remo...
How to: sort arrays and data in PHP
How do I sort an array in PHP? How do I sort a complex array in PHP? How do I sort an array of objects in PHP? Basic one dimensional arr...
How to solve: Parse error: syntax error, unexpected T_XXX
This happens when you have T_XXX token in unexpected place, unbalanced (superfluous) parentheses, use of short tag without activating it in ...
How to return the response from an AJAX call
function foo() { var result; $.ajax({ url: '...', success: function (response) { result = res...
No comments:
Post a Comment