Thursday, July 18, 2013

Create class and method

<?php
class dateNow
{
protected $_dateNow='';

public function getCurrentDate()
{
$_dateNow=date("y-m-d");
return $_dateNow;
}


}
$call_date=new dateNow();
echo $call_date->getCurrentDate();
?>

No comments:

Post a Comment