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.
I am really new to this so this might seem stupid but I have this really simple code to display my content in a table
Περιγραφή |
Τιμή |
print $node->field_description[0]['view'] |
print $node->field_price[0]['view'] |
print $node->field_description[1]['view'] |
print $node->field_price[1]['view'] |
print $node->field_description[2]['view'] |
print $node->field_price[2]['view'] |
print $node->field_description[3]['view'] |
print $node->field_price[3]['view'] |
If I only have 4 elements in my table this is fine but what if I want to create more data everytime I need more code. I think what I need is a way to use a variable for the number of elements each time so I can create exactly the number of rows I need.
Can anyone help?
Comments
Comment #1
probatina CreditAttribution: probatina commentedComment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI don't unterstand how this is related to cck blocks. Could you pleasee explain that?