I created a form on my Drupal 6 site where users have the option to choose multiple topics from a checkbox list. Here is what I am doing to try and output those values:
$i = 0;
foreach ($node->field_topics as $key => $value) {
echo "$key => $value<br />";
$i++;
}
This outputs to (if the user were to choose 3 topics):
0 => Array
1 => Array
2 => Array
How do I get the actual value in the array and not just the word "array?"
I tried this:
$node->field_topics['value'] or $node->field_topics['#value'];
and it says invalid argument.
Thanks for any help on this.
$node->field_topics
depends from the type of the node field. Apart from what said from @StoneVo, there isn't nothing else that can be said. – kiamlaluno♦ Apr 3 at 18:43