Skip to content

Instantly share code, notes, and snippets.

@ivandoric
Created April 23, 2014 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandoric/11215603 to your computer and use it in GitHub Desktop.
Save ivandoric/11215603 to your computer and use it in GitHub Desktop.
drupal: Print out user fields
<?php
/*use print_r($user_profile['field_name']); to check out the array */
/*Some examples of this method */
<li><?php print $user_profile['field_drzava']['#title'] ?>: <?php print $user_profile['field_drzava'][0]['#markup'] ?></li>
<li><?php print $user_profile['field_tel_']['#title'] ?> <?php print $user_profile['field_tel_'][0]['#markup'] ?></li>
<li><?php print $user_profile['field_fax_']['#title'] ?> <?php print $user_profile['field_fax_'][0]['#markup'] ?></li>
<li><?php print $user_profile['field_sjediste_firme_']['#title'] ?> <?php print $user_profile['field_sjediste_firme_']['#items'][0]['value'] ?></li
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment