Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change fullwidth characters to halfwidth

Tags:

javascript

php

"合同会社Knowledge Library" => "合同会社Knowledge Library"

I want to convert only alphanumeric characters in the string to single byte using java script or php

like image 653
Pradeep Sathyaraj Avatar asked Oct 27 '25 09:10

Pradeep Sathyaraj


1 Answers

In PHP, use mb_convert_kana to convert "zen-kaku" to "han-kaku".

like image 76
deceze Avatar answered Oct 28 '25 22:10

deceze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!