- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$testArray = array("now");
$unixArray = array();
for($i = 0, $size = count($testArray); $i < $size; ++$i) {
$testDate = $testArray[$i];
$unixArray[$i] = strtotime($testDate);
}
for($i = 0, $size = count($unixArray); $i < $size; ++$i) {
$unixDate = $unixArray[$i];
echo $testDate, "\n";
echo $unixDate, "\n";
echo date('l H\:iO',strtotime($testDate)), "\n";
echo date('r',strtotime($testDate)), "\n";
echo "\n";
}