Main menu

Sometimes Drupal Complex array filled Objects just kill me

20 Jun
Published by Mark W. Breneman

dpm($contexts); Returns this: "url" is string and is the first item in the array"field_connect_facebook", that is contained in a object "data", that is contained in an object "argument_nid_1", that is contained in an array "context" So to get the URL you use: $contexts[argument_nid_1]->data->field_connect_facebook[0][url]

Category 

Drupal

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.