Closed (fixed)
Project:
Node clone
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2010 at 17:29 UTC
Updated:
6 Jul 2012 at 01:25 UTC
Thanks for this module, it's a life saver! Simple question but I can't figure it out... is there a way to empty the entire array of values?
My node has a user reference field with unlimited values, and I want to remove all of those values (ie, not clone that field). I suppose I can go count the number of values and empty them all, but it shouldn't be that difficult. I've tried the following lines, but none work. Is it a syntax error, or do I really have to count the values and delete each one?
$node->field_reviewers = NULL;
$node->field_reviewers[] = NULL;
unset($node->field_reviewers);
Comments
Comment #1
pwolanin commentedI'd try
$node->field_reviewers = array();