New to Drupal and I'm assuming the answer is simple, I've looked through the test suites etc. and still missing the point it seems.

I have a node with a field collection (field_theatre_date_set) that will store a number of dates and times. I have loaded the node and the collection is there but it's empty.

I have used various forms of this and an obvious problem is that the $field_collection_item_value below array structure just isn't there.

Any further pointers greatly received.

    $loop=0;
    foreach($showing_array as $key=>$value){
	
	 $date='xxxx';
	 $time='xxxx';

	 $field_collection_item_value = $node->field_theatre_date_set[LANGUAGE_NONE][0]['value'];      
     $field_collection_item = entity_load('field_collection_item', array($field_collection_item_value)); // Load that field collection item	

	 $field_collection_item->field_theatre_date_set_date[$node->language][$loop]['value'] = $date;          
	 $field_collection_item->field_theatre_date_set_time[$node->language][$loop]['value'] = $time;
     $loop++
    }
     $field_collection_item->save();