Php大写首字母

代码示例

10
0

ucfirst()php


<?php
$foo = 'hello world!';
$foo = ucfirst($foo);             // Hello world!

$bar = 'HELLO WORLD!';
$bar = ucfirst($bar);             // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
// string manipulation function 
9
0

字符串首字母大写php


<?php
$foo = 'hello world!';
$foo = ucfirst($foo);             // Hello world!

$bar = 'HELLO WORLD!';
$bar = ucfirst($bar);             // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>

5
0

首字符大写php

ucwords("hello world"); // Hello World
ucfirst("hello world"); // Hello world
2
0

php首字母大写

ucfirst("hello world!");
2
0

ucfirst

<?php
/* Convert the first character of "hello" to uppercase:  */
echo ucfirst("hello samy!");

//output : Hello samy!
?>
1
0

php大写首字母

ucfirst($myword);

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................