With Gravity forms multi select, the data is stored in an array and as such is not in a useable form if you are using rgar
rgar is a gravity forms function that can be used to extract a specific property of an array without need to check if that property exists
rgar( $array, $prop );
So if you have the form entry object ($entry) and the form field id (2), you now have the entry for field 2, and can use that information
$companyname = rgar( $entry, '2' );
However, for a multiselect, the data in the field is also stored in an array, and the rgar() function is insufficent
So we have to use the get_value_export() on the field object
Step 1 – we have to access the field object for the field in the $entry we are interested in
$field = GFFormsModel::get_field( $form,37 );
Step 2 – we now used the method to extract the value as a CSV string
$businessat= $field->get_value_export( $entry, 37 );
If we were to use this data as an array (if we were using in the ‘tax_input’ attribute of the wp_insert_post() function, we would convert it to an array using the str_getcsv() function
$membertax = array(
'business-category' => str_getcsv($businessat) ,
);