how to make first letter only captial using php

how to make first letter only captial using php

how to make first letter only captial using php.

Php has a little function call ucfirst($string);

where you can make sure the first letter of the string is a captial. Please not though that this will only work if the string is lower case, it only changes the first letter no others so if your string is all captials you won't notice a difference.

If you want to change captials to this then you have to add a little more

<?php

$string = 'HELLO WORLD!';

echo ucfirst(strtolower($string)); // Hello world!

?>

 


CAN YOU HELP


Turbo Charge your business

We put our money where our mouth is. Our mission is to help any business anywhere get back on track.

If we don't bring you new customers you pay us nothing. We take nothing up front and there is no contract. We trust you implicitly. And it is literally if you don't pay us for bringing in new customers, then we stop brining them in.

You decide how much you are willing to pay for a customer and you pay once we bring them to you.

Simple, easy nothing else to explain.

If you would like us to help you get your business or products booming email us at zigzads@gmail.com

Speak soon.