I am trying to use the following command:
wp_set_object_terms( $myID, $myissuearray, 'my_issues', true );
But for some reason, it won't accept my variable array.
That array, $myissuearray, using error_log(print_r($myissuearray,true)) outputs:
Array
(
[0] => 9
[1] => 10
[2] => 77
[3] => 12
)
Which sure looks like a valid array to me.
If on the other hand, I don't use my variable and set the issue array by hand in the command to something like:
wp_set_object_terms( $myID, array(9,10,77,12), 'my_issues', true );
the command works and the terms are set. I am stumped as to what I am doing wrong. Why won't this command accept my variable array??
$myissuearray? also can youvar_dumpinstead ofprint_rand show the result?