如果条件与希伯来字母 [英] If conditions with hebrew letter

查看:159
本文介绍了如果条件与希伯来字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

拆分变量的第一个字母

代码:

if($firstletter=='I')
{
     $picture = ImageCreateFromPNG ($global['maleBackgroundImages'][5]);
}
else
{
     $picture = ImageCreateFromPNG ($global['maleBackgroundImages'][4]);
}

如果我想将'I'改为希伯来文我如何做?
如果我要检查范围

If I want to change the 'I' to hebrew letter how I do it? and if I want to check range

$firstletter>a **and** $firstletter<b 

我如何在if?

推荐答案

假设UTF-8字符集

$firstletter = mb_substr($userData['name'], 0, 1, 'UTF-8');
if ($firstletter=='א') {
    ...
}


b $ b

或修改适当的字符集

or modify for the appropriate character set

这篇关于如果条件与希伯来字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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