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
iOS: performSelector may cause a leak because its selector is unknown
Here's what I'm doing: [ _controller performSelector : NSSelectorFromString (@ "someMethod" )]; The solution for this e...
PHP: Check if string contains specific word
You can use the strpos function which is used to find the occurrence of one string inside other: if ( strpos ( $a , 'are' ) !== ...
Good practices (Oriented Object Programming): Why use getters and setters
There are actually many good reasons to consider using accessors rather than directly exposing fields of a class - beyond just the argument...
How to: Change the maximum upload file size PHP
For this you need to set the value of upload_max_filesize and post_max_size in your php.ini : ; Maximum allowed size for uploaded file...
How to: use arrays in C++
Arrays on the type level An array type is denoted as T[n] where T is the element type and n is a positive size, the number of elemen...
No comments:
Post a Comment