Adding to the next element in a multidimensional array

Posted on 16th Feb 2014 by admin

Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spot in the field_spaces array. Always adding to the next spot. I'll be calling this in a for loop to add things in there... Can anyone offer a hand?

$node->field_spaces (array)
$node->field_spaces[0] (array)
$node->field_spaces[0]['nid']

Thank you

Other forums