Array
(
[13] => stdClass Object
(
[action] => click
[timestamp] => 2017-05-09T18:00:41+00:00
[url] => https://xxxxx.xxx/xxx/sdfsdfsd
[title] => download e-book
)
[14] => stdClass Object
(
[action] => click
[timestamp] => 2017-05-09T18:00:41+00:00
[url] => https://xxxxx.xxx/xxx/sdfsdfsd
[title] => download e-book
)
[17] => stdClass Object
(
[action] => open
[timestamp] => 2017-05-09T18:00:21+00:00
[url] => https://yyyyyyy.yyy
[title] => download e-book
)
)
I have used this function to filter array
function filter_callback($element) {
if (isset($element->action) && $element->action == 'click') {
return TRUE;
}
return FALSE;
}
function filter_callback1($element) {
if (isset($element->url) && $element->url == 'https://yyyyy.yyy') {
return TRUE;
}
return FALSE;
}
should be able to send
'https://yyyyy.yyy' ,url, click, action to function
How to combine these two functions into one function such that I can send action and URL to this function and fetch the correct result