PHP Salt


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

Version: 2.33.2
Last Build: December 29, 2023 20:28pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
file
graph
html
mail
math
misc
mobile
script
string
system
time
web
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