You might wonder why trim( html_entity_decode( 'nbsp ;')); doesn't reduce the string to an empty string, that's because the' nbsp; 'entity is not ASCII code 32 (which is stripped by trim()) but ASCII code 160 (0xa0) in the default ISO 8859-1 characterset.
참고: You might wonder why trim(html_entity_decode(' nbsp;')); doesn't reduce the string to an empty string, that's because the 'nbsp;' entity is not ASCII code 32 (which is stripped by trim()) but ASCII code 160 (0xa0) in the default ISO 8859-1 characterset.