Convert only string first letter to uppercase in PHP

How to change string variable’s first character to capital in php program.

In this tutorial we are converting only first letter of whole word means it will automatically changes the first letter into upper case letter and the rest of characters inside word remain same. So here is the complete step by step tutorial for Convert only string first letter to uppercase in PHP.

android-project-download-code-button

How to Convert only string first letter to uppercase in PHP.

Code for convert-only-string-first-letter-uppercase.php file.

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Convert only string first letter to uppercase</title>
</head>

<body>

<?php

$name = "android";

echo "Without first letter capital = ". $name . '</br>';

echo "With first letter capital = ". ucfirst(strtolower($name));


?>


</body>
</html>

Screenshot:

Convert only string first letter to uppercase in PHP

Click here to download Convert only string first letter to uppercase in PHP project with source code.