method getRow documentation in bbn\X

Returns the first row of an array that satisfies the where parameters ({@link find()).

Example

X::dump(X::getRow([[ 'id' => 1, 'name' => 'Andrew', 'fname' => 'Williams' ], [ 'id' => 2, 'name' => 'Albert', 'fname' => 'Taylor' ], [ 'id' => 3, 'name' => 'Mike', 'fname' => 'Smith' ], [ 'id' => 4, 'name' => 'John', 'fname' => 'White' ]], ['name' => 'Albert'])); // array [ "id" => 2, "name" => "Albert", "fname" => "Taylor", ] function(array $r, $where) { if (($res = self::find($r, $where)) !== null) { return $r[$res]; } return null; }

Returns the first row of an array that satisfies the where parameters ({@link find()). BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.