Ale*_*lex 1 php
我有一个$name包含名字和姓氏的字符串,例如Bob Smith,假设用户输入bob smith我希望能够将他们的名字和姓氏的首字母大写.
$name
Bob Smith
bob smith
我试过这个:$bar = ucfirst(strtolower($bar)); // Hello world!只输出Bob smith.如何才能使名字和姓氏都大写?
$bar = ucfirst(strtolower($bar)); // Hello world!
Bob smith
Nie*_*sol 6
ucwords
相关功能很有用.
docs http://img196.imageshack.us/img196/2283/h21r.png
归档时间:
11 年,10 月 前
查看次数:
499 次
最近记录: