api/MarkLogic/MLPHP/SearchResults.php
public function getResultByIndex($index)
    {
        $res = null;
        foreach ($this->results as $result) {
            if ($result->getIndex() == $index) {
                $res = $result;
            }
        }
        return $res;
    }
public function getResultByIndex($index)
    {
        $res = null;
        foreach ($this->results as $result) {
            if ($result->getIndex() == $index) {
                $res = $result;
            }
        }
        return $res;
    }
Get a search result corresponding to an index.

@param int $index A search result index.
@return SearchResult A search result object or null if none found.