You are here

function Record::subfield in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 marcParse/php-marc.php \Record::subfield()
  2. 7 modules/marcParse/php-marc.php \Record::subfield()
  3. 7.2 modules/marcParse/php-marc.php \Record::subfield()

Get subfield of Field object

Returns the value of a specific subfield of a given Field object

Parameters

string Name of field:

string Name of subfield:

Return value

string|false Return value of subfield if Field exists, otherwise false

File

modules/marcParse/php-marc.php, line 557

Class

Record
Record Class Create a MARC Record class

Code

function subfield($field, $subfield) {
  if (!($field = $this
    ->field($field))) {
    return false;
  }
  else {
    return $field
      ->subfield($subfield);
  }
}