RosettaCodeData/Task/String-case/PHP/string-case.php
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

8 lines
284 B
PHP

$str = "alphaBETA";
echo strtoupper($str), "\n"; // ALPHABETA
echo strtolower($str), "\n"; // alphabeta
echo ucfirst($str), "\n"; // AlphaBETA
echo lcfirst("FOObar"), "\n"; // fOObar
echo ucwords("foO baR baZ"), "\n"; // FoO BaR BaZ
echo lcwords("FOo BAr BAz"), "\n"; // fOo bAr bAz