PHP Salt


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

Version: 2.25.1
Last Build: July 17, 2019 09:07am (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
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:

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