Regarding comment about trimming empty strings, the code posted will get into an infinite loop if the array is reduced to zero elements. The following might be better:
<?php
function array_trim($array) {
while (!empty($array) and strlen(reset($array)) === 0) {
array_shift($array);
}
while (!empty($array) and strlen(end($array)) === 0) {
array_pop($array);
}
return $array;
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 69.228.143.185
----
Manual Page -- http://www.php.net/manual/en/function.array-filter.php
Edit -- https://master.php.net/note/edit/86228
Del: integrated -- https://master.php.net/note/delete/86228/integrated
Del: useless -- https://master.php.net/note/delete/86228/useless
Del: bad code -- https://master.php.net/note/delete/86228/bad+code
Del: spam -- https://master.php.net/note/delete/86228/spam
Del: non-english -- https://master.php.net/note/delete/86228/non-english
Del: in docs -- https://master.php.net/note/delete/86228/in+docs
Del: other reasons-- https://master.php.net/note/delete/86228
Reject -- https://master.php.net/note/reject/86228
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.