The Problem
Ignoring specific values, when arrays are pulled, using medoo, and merged.
The Details
Say I have two arrays, created from two similar tables. They have a 'user'-row and an 'id'-row. Example below:
id name
------- ---------
1 John Doe
2 John Snow
3 Jane
4 Jane
What is the best way to ignore all entries that have 'John ...' in the name row? My array_merge is currently like this:
public function getUsersByName($name)
{
$res = array_merge(
$this->_db->select('users1', ['id', 'name'],
$this->_db->select('users2', ['id', 'name']
);
return $res;
}
This returns a nice array, with all values in the tables. What is the best practice to ignore those values, and skip to the next legitimate value?