[함수] htmlspecialchars_decode와 html_entity_decode의 문자열 처리의 다른 점 php에서 Special HTML entities를 decode 하기위헤 일반적으로 htmlspecialchars_decode를 많이 사용하실 텐데요. 이 함수를 사용시에는 ' '를 공백으로 변환하지 않습니다.
이런 경우에는 html_entity_decode 함수를 사용하면 공백도 변환이 됩니다. 이 두함수의 차이는 메뉴얼에 나와있습니다만 요약하자면 html_entity_decode는 모든 html entities를 변환하고 htmlspecialchars_decode는 메뉴얼에 안내된 html entities만 변환한다는 것입니다.
결론은 decode 시에 상황에 따라 함수를 선택하면 되는데 .....