Jump to content

[SOLVED] Converting Case


twilitegxa

Recommended Posts

Is there a way to convert the case of output from the database to just uppercase on the first letter of the output? I don't need every other word, just the first word.

 

Examples:

 

I want to go to the store...

To become a doctor one day...

To marry one day...

 

All other characters need to be lowercase. Just the first letter to be uppercase. Can this be set?

Link to comment
https://forums.phpfreaks.com/topic/166923-solved-converting-case/
Share on other sites

Make sure you look at the examples on the page that Q linked to. You need to use a combination of ucfirst() AND strtolower() to get what you want - unless the values from teh DB are always in lower case to begin with. But, just look at the examples and there is one exactly for what you need.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.