this->output class problem |
[eluser]Skoobi[/eluser]
Hi im struggling to get the output class working correctly on my site. Im trying to add the Code: $this->output->set_header('Last-Modified: '.date('Y m d H:i:s', $content['created']).' GMT'); If i echo the $content['created'] i get 2014-07-05 06:30:26 But i get this error: Severity: Notice Message: A non well formed numeric value encountered Filename: includes/header.php Any ideas?? Many Thanks Chris
[eluser]Tpojka[/eluser]
I've just searched for some solution on google. Check these links (if you didn't already): Function strtotime(); Topic here.
[eluser]jonez[/eluser]
Missing hyphens and you have to run your variable through strtotime. Code: date( 'Y-m-d H:i:s', strtotime( $content[ 'created' ] ) )
[eluser]Skoobi[/eluser]
Ah that seems to have sorted the issue. Many thanks to you all for helping. |
Welcome Guest, Not a member yet? Register Sign In |