I had the same problem.
echo substr( $custom_field, 0, -6 );
echo str_replace(' ', '', $custom_field);
I think I solved it this way.
echo substr( str_replace(' ', '', $custom_field), 0, -6 );
I had the same problem.
echo substr( $custom_field, 0, -6 );
echo str_replace(' ', '', $custom_field);
I think I solved it this way.
echo substr( str_replace(' ', '', $custom_field), 0, -6 );