开发者

Does strtoupper work with letters and numbers

I have a short line of code that I would like to make uppercase.

$box = mysql_real_escape_string(strtoupper($_POST['box']));

For some reason, it is not making it u开发者_运维问答ppercase. Could it be because the post is a mixture of letters and numbers? ie; ee588. Thanks


You can also try to use mb_strtoupper($str, 'UTF-8');. This accept the encoding. Maybe you are having not exactly the letter 'e' like you know.

Link to manual: mb_strtoupper()


this works:

echo strtoupper('ee588');

you should check that the 'ee' you see is correctly encoded
you can test it here


Check your locale settings. Strtoupper is locale-dependent

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜