I am building a template from scratch and don't know the essential difference between:

<?php print $node->field_date_of_birth[0]['value'] ?> and
<?php print $node->field_date_of_birth[0]['view'] ?>

both give the same value. Is there any difference or should I keep to the default which is:

<?php foreach ((array)$field_date_of_birth as $item) { ?>
      <div class="field-item"><?php print $item['view'] ?></div>
    <?php } ?>

Comments

davidrf’s picture

I'm sure someone else could give you a technical explanation, but I've noticed that one of these translates html tags within the data literally and the other does not. Apologies that I don't remember which is which off the top of my head, but it's simple enough to test.

creazion_dev’s picture

Hi esllou

value is the plain value and
view is the filtered value (e.g. Line break converter)

---------------------------------------------
www.creazion.de