I have the class "list_member":
class list_member
{
public $id;
public $email;
public $lastchange;
public $active;
public $hash;
public $list_id;
function __construct($id,$email,$lastchange,$active,$hash,$list_id)
{
$this->id = $id;
$this->email = $email;
$this->lastchange = $lastchange;
$this->active = $active;
$this->hash = $hash;
$this->list_id = $list_id;
}
}
And i have an array of list_members. Now i want to get the member with the unique id ($this->id) of e.g. 42.
How is this possible without looping through the whole array and checking every single entry?