Passing multiple field entries in Array

I am trying to pass label and value data from multiple fields using ;

$selected_field_ids = array(5, 6, 8,10,15);

But the above code does not work.

I would be grateful for advice on how to rewrite the above.

Thanks.

Mo

Can you provide more context, please? I can see you have a hardcoded array of field IDs, but I don’t see any code example of what you’re trying to do with it.

Is this inside a filter or hook? Or are you asking where it should go?

—Tessa Watkins, Interactive Web Developer