code: public function replaceValue($fieldName, $oldvalue, $newvalue)
      {
          $result = $this->row[$fieldName];
          if (!is_array($result)) {
              if ($oldvalue == $result) {
                  $this->row[$fieldName] = $newvalue;
                  $this->informChanges();
              }
          } else {
              for ($i = count($result) - 1; $i >= 0; $i--) {
                  if ($result[$i] == $oldvalue) {
                      $this->row[$fieldName][$i] = $newvalue;
                      $this->informChanges();
                  }
              }
          }
      }
docs: Update a specific field and specific value with new value
  
  @param String $fieldName
  @param String $oldvalue
  @param String $newvalue