Thursday, 23 April 2015

PHP - auto refreshing page

<meta http-equiv="refresh" content="5" > 

just add it after the head tags

where 5 is the time your page will refresh itself

Monday, 30 March 2015

Convert number to month name in PHP

$monthNum  = 4;
$dateObj   = DateTime::createFromFormat('!m', $monthNum);
$monthName = $dateObj->format('F'); //April
$monthName = $dateObj->format('m'); //01