有时候在编辑word里面首写英文是大写,怎么用程序实现这个功能呢,php有字符串函数去实现这个需求
<?php $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // Hello world! ?>
这样就实现了首写字母大小的需求