samedi 14 mars 2015

How to format date in Italian way php

I have got a webpage that get some values from a mysql database, there's also a date value, i need to change it from y-m-d 2015-03-12 to d-m-y 12-03-2015 or better in for example Monday 12 March in italian if it's possibile how can i do?


this is what I tried



$data= mysql_result($result,$i,"data");
$retrieved = '$data';
$date = DateTime::createFromFormat('Ymd', $retrieved);
echo $date->format('d/m/Y');
$data = $date;

Aucun commentaire:

Enregistrer un commentaire