Hi all -
I am parsing info from mysql into a php table but the date being returned is in YYYY-MM-DD format and I want it DD-MM-YYYY. How would I do this?
Code at the moment is:
$link = connect();
function get_user_posts(){
$getPosts = mysql_query('SELECT a.id as id,a.post as question, a.answer as answer, a.created as created, a.updated as updated, b.vclogin as admin
FROM user_posts as a, admin as b WHERE a.admin_id=b.adminid',connect());
return $getPosts;
}
<table class="list">
<tr>
<th><?php echo getlocal("upost.post") ?></th>
<th><?php echo getlocal("upost.answer") ?></th>
<th><?php echo getlocal("upost.admin") ?></th>
<th><?php echo getlocal("upost.created") ?></th>
<th><?php echo getlocal("upost.updated") ?></th>
<th></th>
<th></th>
</tr>
<?php
$all_questions = get_user_posts();
while ($question = mysql_fetch_assoc($all_posts)):
?>
<tr>
<td><?php echo $post['post']?></td>
<td><?php echo $post['answer']?></td>
<td><?php echo $post['admin']?></td>
<td><?php echo $post['created']?></td>
<td><?php echo $post['updated']?></td>
<td><a href="javascript:user_post('<?php echo $post['id']?>')">edit</a></td>
<td><a href="javascript:delete_post('<?php echo $post['id']?>')">delete</a></td>
</tr>
THANKS!