Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So far I have:
$tids = $entity->field_taxonomyref;
$i = 0;
foreach($tids as $key => $val) {
$i++;
}
$entity_field[0]['value'] = $i;
But this only returns 1. It's only seeing one value.. how would I loop through all the values?
Comments
Comment #1
colanComment #1.0
colanadded code