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
HTML Best Practices: HREF attribute for JavaScript link # or javascript:void(0)
<a href = "#" onclick = " myJsFunc (); " > Run JavaScript Code </a> <a href = "javascript:void(0...
How to: Make asyncronous call to file with PHP
make_request ( 'http://www.externalsite.com/script1.php?variable=45' ); //example usage $output = make_request ( 'http://ww...
Read a PDF file with PHP
For this there's a PHP library called FPDF (with FPDI): http://www.fpdf.org http://www.setasign.de/products/pdf-php-solutions/fpdi/ ...
HTML5: Change placeholder input color with CSS
Implementation to change placeholder color There are three different implementations: pseudo-elements, pseudo-classes, and nothing. Web...
How to solve: Parse error: syntax error, unexpected '['
This error comes in two variatians: Variation 1 $arr = [ 1 , 2 , 3 ]; This array initializer syntax was only introduced in PHP 5.4;...
No comments:
Post a Comment