Jump to content

current date displaying incorrectly


php_begins

Recommended Posts

I am writing code in the ZEND framework and i need to get the current day in like 2012-02-03:

In the controller:

$time=date('YYYY-mm-dd',time());
$this->view->time=$time;

In view:

 

<?php echo $this->time; ?>

 

Output:

2012201220122012-0202-0303

 

I dont know why it is displaying like that instead of once...there is no loop anywhere.

 

 

Link to comment
https://forums.phpfreaks.com/topic/256335-current-date-displaying-incorrectly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.