Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - epoch to date with PHP substr

0 votes
added Mar 25 in PHP by LC Marshal Captain (22,730 points)
// "node_created":"1553498100" get value from API
$newsdate = $row->node_created;
<p class="news-date"><?php print date("F j, Y", substr($newsdate, 0, 10)); ?></p> 
// output $newsdate March 25, 2019


For more date function variation, learn it at 

Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.