[文章作者:张宴 本文版本:v1.0 最后修改:2007.08.15 转载请注明出处:http://blog.zyan.cc]

  当PHP截取中英文混合字符串时,最后一个汉字经常被拆成两半,例:截取字符串的前18个字
  输出为结果为:
引用
1欢迎访问新浪?BR>


  于是写了以下这段代码,判断如果中英文混合字符串中的汉字字节数为奇数,则少截取一个字节,保证汉字显示完整。
  输出为结果为:
引用
1欢迎访问sina新浪


Tags:
技术大类 » PHP/JS/Shell | 评论(174) | 引用(0) | 阅读(45367)
Ethan
2012-12-11 20:25
I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.
24 hour locksmith brooklyn
mary
2012-12-12 09:12
I agree with you. This post is truly inspiring. I like your post and everything you share with us is current and very informative, I want to bookmark the page so I can return here from you that you have done a fantastic job ...
change locks on car
mary
2012-12-12 09:27
I was delighted to find this web site.I wanted to thank you for your time reading this wonderful! I really enjoyed every bit of it and I've marked to ensure that the blog post something new.
change locks on new house
mary
2012-12-12 17:06
You will be missed.The one place where as a venue and fan I could search by what ever perimeters I chose .Good Luck with your future endeavors.
local movers arlington va
mary
2012-12-12 17:28
With the many blogs which I have encountered, I never expected to see a very beautiful post online..After reading this one, I felt so lucky to see its content..-)
movers washington dc
mary
2012-12-12 17:44
I am happy when reading your blog with updated information! thanks alot and hope that you will post more site that are related to this site.
moving washington dc
mary
2012-12-12 18:03
I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
washington dc movers
mary
2012-12-12 18:25
It is very interesting for me to read that article. Thank author for it. I like such topics and everything connected to this matter. I definitely want to read more soon.
movers in washington dc
mary
2012-12-12 18:39
Great article, it was very helpufl! I just started in this and I'm getting to know it better! Cheers, keep up the good work!
columbia md local movers
mary
2012-12-12 18:59
Nice to be visiting your blog again, it has been months for me. Well this article that I've been waited for so long.
fairfax va local movers
Niki Email
2012-12-17 23:00
Useful information shared...Aim very happy to read this article..thanks for giving us nice info. Fantastic walk-through. I appreciate this post.
kitchen design ideas | home design ideas | libros ebook gratis descargar
Spicy Food Email Homepage
2012-12-18 04:26
Good job I enjoyed reading your post thanks for sharing.Spicy Food
Professional Website Design Essex Email Homepage
2012-12-25 03:37
That's really massive exposure post and I must admire you in this regard.Professional Website Design Essex
Colegios bilingües en México Email Homepage
2012-12-27 03:30
Thank you very much for the information provided! I was looking for this data for a long time, but I was not able to find the trusted source.Colegios bilingües en México
Nikita Email
2013-1-3 13:05
I am really impressed by this blog! ensayos cortos famosos  |  trabajo de investigacion
Niki Email Homepage
2013-1-8 17:34
Thanks for sharing your good thoughts and idea here. Just continue on sharing your talent and creation to us readers. libros ebook gratis descargar http://furzoo.com/libros-ebook-gratis-descargar
pioneer Email
2013-1-9 06:46
Wonderful post. I am searching awesome news and idea. What I have found from your site, it is actually highly content. You have spent long time for this post. It's a very useful and interesting site. Thanks!
dallas car service
dany
2013-1-9 06:46
certainly a fantastic piece of work ... It has relevant information. Thanks for posting this. Your blog is so interesting and very informative.Thanks sharing. Definitely a great piece of work Thanks for your work.
fha Home Loan
2013-1-21 14:52
不行
Design a Professional Logo Email Homepage
2013-1-21 19:24
Cool blog you got here. I'd like to read a bit more concerning this topic. Thanks for giving this info.Design a Professional Logo
分页: 4/9 第一页 上页 1 2 3 4 5 6 7 8 9 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]