如何用PHP去除这些(?)类型的字符? [英] How can I strip these (â?²s) type of characters with PHP?

查看:89
本文介绍了如何用PHP去除这些(?)类型的字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CodeIgniter / MySQL开发应用程序。昨晚我把一个标题存储到我的数据库
HTML5的占位符属性。
存储后,当我从数据库检索显示它显示一些奇怪的字符,像这样:
HTML5′s占位符属性。

I am developing an application using CodeIgniter/MySQL. Last night I stored a title into my database "HTML5′s placeholder Attribute". After storing when I retrieve from database for display it shows some strange characters like this: "HTML5â?²s placeholder Attribute".

可以避免这些奇怪的字符?

How I can avoid these strange characters?

推荐答案

当我从文本编辑器复制数据并粘贴到phpmyadmin 。如果你这样做,那么你的文本编辑器可能使用不同的编码。我建议你将数据复制到简单的文本编辑器,如记事本,并手动替换撇号。手动替换'with',它应该可以正常工作。

I had a similar problem when I was copying data from a text editor and pasting it in phpmyadmin. If you're doing this then your text editor might be using different encoding. I suggest you copy the data into a simple text editor like a notepad and manually replace the apostrophes. Manually replace ‘ with ' and it should work fine.

这篇关于如何用PHP去除这些(?)类型的字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆