Convert all types of smart quotes with PHP

后端 未结 2 1509
生来不讨喜
生来不讨喜 2020-11-27 16:28

I am trying to convert all types of smart quotes to regular quotes when working with text. However, the following function I\'ve compiled still seems to be lacking support a

2条回答
  •  离开以前
    2020-11-27 17:20

    You can use this one function to convert all characters:

    $output = iconv('UTF-8', 'ASCII//TRANSLIT', $input);
    

    Be sure and change your types to what you need.

    (note: this is from another similar question found here).

提交回复
热议问题