arnoldssss arnoldssss - 1 month ago 10
PHP Question

Convert a date into a date with day of the week php native

Basically I want to convert this date : 2016/12/18
to : Sunday, December 18, 2016.

I'm using zend framework and php 5.4

I'm really new with this I tried to use:

date( "Y/m/d", strtotime( $model->startDate))->toString(Zend_Date::DATE_FULL) ;


but brings:
Call to a member function toString() on a non-object
Any idea? It's possible to make this on php native?
Thanks!

Answer
<?php 

  $x = "2016/12/18";

  echo date( "l, F d, Y", strtotime($x)); 

?>

Will return:

Sunday, December 18, 2016

---

Check here for date parameters:

http://php.net/manual/en/function.date.php