PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.20.2
Last Build: October 16, 2017 12:40pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
file
graph
html
mail
math
misc
mobile
script
string
system
time
psDate()
Returns date and time in simple format


Description:

This is just a wrapper for: date("m/d/y") and date("g:i a")


Usage:

$dt = psDate([UNIX_TIME])
$dt = psTime([UNIX_TIME])


Example:

	$d = psDate();		// now
$t = psTime(); // now
print "Date: $d Time: $t";




Code:

function psDate($ts="")
{
if ($ts == "") { $ts = time(); }
return date("m/d/y",$ts);
}

function psTime($ts="")
{
if ($ts == "") { $ts = time(); }
return date("g:i a",$ts);
}



Changlelog:

02/26/2015 : Added psTime() for simple time
See Also

And a shot out to:

LinuxSimple - www.linuxsimple.com
PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site