how to get the first letter of a non latin string with php

前端 未结 0 1937
陌清茗
陌清茗 2020-12-12 03:10

For grabbing the first letter of a string i use substr

$string = "John doe";
echo substr($string,0,1);
// output: J

Bu

相关标签:
回答
  • 消灭零回复
提交回复
热议问题