function Field::subfield in Bibliography Module 6
Same name and namespace in other branches
- 6.2 modules/marcParse/php-marc.php \Field::subfield()
- 7 modules/marcParse/php-marc.php \Field::subfield()
- 7.2 modules/marcParse/php-marc.php \Field::subfield()
* Get the value of a subfield * * Return of the value of the given subfield, if exists *
Parameters
string Name of subfield: * @return string|false Value of the subfield if exists, otherwise false
File
- marcParse/
php-marc.php, line 872
Class
- Field
- Field Class Create a MARC Field object
Code
function subfield($code, $repeatable = FALSE) {
if (array_key_exists($code, $this->subfields)) {
return $repeatable ? $this->subfields[$code] : $this->subfields[$code][0];
}
else {
return $repeatable ? array() : FALSE;
}
}