PHP: Calling a function within a return string -


i'm trying call function within string return statement. both in same class. however, i'm not calling right because doesn't work :)

private static function dosomething(){    $d['dt'] = //unix time stamp here;     return '<div class="date" title="commented on '.date('h:i \o\n d m y',$d['dt']).'">'.time_since($d['dt']).'</div>'; }  function time_since(){    //return 'string'; } 

any appreciated! thanks

first, calling time_since() , function time_stamp().

second, in php need explicitly call $this->time_stamp() - not resolve object scope c++ does.

third, cannot call regular method static function because object not instantiated - make time_stamp() static too. if this, needs invoked self::time_stamp().


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -