Open hackerspk opened 1 year ago
Here's an example:
foreach ($record->getFields("505") as $field) {
foreach ($field->getSubfields() as $subfield) {
if ($subfield->getCode() === "t") {
...
}
}
}
A general tip is to autocomplete "get" to get an overview of available methods:
Thanks for the great code.
How can I loop through all subfields of a field. For example the field 505 is generally used to store table of contents of a book. It has a,t,g,r sub fields. Is it possible to loop through all sub fields of 505 and check sub field name. something like: