I'm wondering if there is a way to filter out an array like you can do in SQL queries. Like WHERE, OR, LIMIT, ORDER BY (etc). I'm caching my tables in JSON files to avoid unnecessary mysql connections.
Let me explain
This is my example array
$array = array(
0 => array('value1', 'value2', 'value3', 'value4', 'value5', 'value6', 'value7'),
1 => array(1, '-1', 1, 'Google.com', 'http://google.com/', 'about:blank', 1),
2 => array(2, '-1', 2, 'Yahoo.com', 'http://yahoo.com/', 'about:blank', 1),
3 => array(1, '-1', 1, 'Bing.com', 'http://bing.com/', 'about:blank', 3),
4 => array(1, '-1', 1, 'Youtube.com', 'http://youtube.com/', 'about:blank', 3),
5 => array(1, '-1', 1, 'Facebook.com', 'http://facebook.com/', 'about:blank', 4),
6 => array(1, '-1', 1, 'Stackoverflow.com', 'http://stackoverflow.com/', 'about:blank', 3),
);
Now I wanna filter my array out.
Lets say I just want records where value7 is 3 or value3 is Bing.com, or value2 is -1. Is this possible todo without hundreds of loops and checks?
Is it worth it or will a SQL server cost less?