First of all thanks for taking the time to look into this.
I store the date in my database as a unix timestamp and when I get all the info using:
while($row = mysql_fetch_assoc($result)) {
$posts[] = $row;
}
/* return the posts in the JSON format */
return json_encode($posts);
The date is available only as a unix timestamp when I try to get it using the following:
var postHandler = function(postsJSON) {
$.each(postsJSON,function(i,post) {
alert(post.date);
}
}
Is there a way to convert it to readable date before sending it by JSON? Or even afterwards?
Thanks a lot for your help.