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
psAryTrim()
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:

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