Changing the Case of a String in PHP


Convert strings to uppercase or lowercase with strtoupper() and strtolower().

Source Code

$original = "Make Me Upper";
$upper = strtoupper($original);
$lower = strtolower($original);
echo $upper . " | " . $lower; // Outputs: MAKE ME UPPER | make me upper
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments