PHP字符串大小写转换:
1. strtolower():字符串转小写;
2. strtoupper():字符串转大写;
3. ucfirst():字符串中首字符转大写;
4. ucwords():字符串中每个单词首字符转大写;
5. lcfirst():字符串首字符转小写;
w3c-strtolower()跳转
isset() : 在php中用来检测变量是否设置,该函数返回的是否布尔值,即true/false。变量等于null或 unset(),则返回false。
输出的表示方式:
print_r() 和 var_dump()
$colors = array('red', 'blue', 'green', 'yellow');
print_r($colors);
echo '<br>';
var_dump($colors);
输出结果如下:
Array ( [0] => red [1] => blue [2] => green [3] => yellow )
array(4) { [0]=> string(3) "red" [1]=> string(4) "blue" [2]=> string(5) "green" [3]=> string(6) "yellow" }