Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Tweeted twitter.com/#!/StackDrupal/status/234573058759856128
Source Link
Jordan
  • 115
  • 1
  • 5

How can I extract info from the user_profile array

So I know that the $user_profile is basically an array. And when I use the DSM command with devel I saw all that info in the array, but how on earth do I begin extracting and displaying data from that?

I'm still not too keen on php, trying to learn as I go and on the side. I understand the concepts of an array and how to get top level stuff. But for those items embedded in other arrays embedded in yet more arrays, I'm not sure how to get to those and display them.

For a simple instance I just want to take the username of the profile currently being views and display it on a custom user-profile.tpl page. And I see it with devel, but I don't know how to get it.