My content type uses a field collection (field_site_web) to allow users to enter multiple websites, consisting of a name (field_site_name) and an internet connection (field_link).
I want to use a foreach()
loop to get those value, but I do not know how to access these fields. How can I do?
EDIT
how can I do to avoid the error in the line of the foreach? I tried so, but does not work:
if($fc_fields != false){
// Extract the field collection item ids
$ids = array();
foreach ($fc_fields as $fc_field) {
$ids[] = $fc_field['value'];
}
}