RSS Feed/News array_filter with callback?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,669
Points
823

Reputation:

Code:

Code:
            $newCustomFields = $this->filter('custom_fields', 'array');
            $newCustomFields = array_filter($newCustomFields);

I would like to make a check on " ";

Code:

Code:
    private function checkElement($var)
    {
       return trim($var) != '';
    }

How can I call checkElement?

Code:

$newCustomFields = array_filter($newCustomFields,'checkElement');

does not work

Any idea?

Continue reading...
 
Status
Not open for further replies.
Top