public function update($index, $data)
    {
        $db = $this->load();
        $db[$index] = array_merge($db[$index], $data);
        return $this->rewrite($db);
    }
public function update($index, $data)
    {
        $db = $this->load();
        $db[$index] = array_merge($db[$index], $data);
        return $this->rewrite($db);
    }
public function update ( $ index , $ data ) { $ db = $ this -> load ( ) ; $ db [ $ index ] = array_merge ( $ db [ $ index ] , $ data ) ; return $ this -> rewrite ( $ db ) ; }
Updates a row in the database.

@param integer $index    the index of the row to update
@param array $data       the updated row
@return array            the updated data set
Updates a row in the database .