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
psTrimAry()
Trim Array


Description:

This is used to trim every line on an array, if line is empty, then item is unset


Usage:

$ary = psAryTrim($myAry);


Example:






Code:

function psAryTrim($wAry)
{
foreach ($wAry as $key=>$val)
{
$wAry[$key] = trim($val);
if ($wAry[$key] == "") { unset($wAry[$key]); }
}
return $wAry;
}


// just a wrapper, function name is defunc and will be removed
function psTrimAry($wAry) { return psAryTrim($wAry); }



Changlelog:

10-06-2016 v2.11.1 function name changed from psTrimAry() to psAryTrim(), wrapper provided
See Also

And a shot out to:

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