Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Convert the First Character to Upper Case
How To Convert the First Character to Upper Case? - PHP Script Tips - PHP Built-in Functions for Strings
✍: FYIcenter.com
If you are processing an article, you may want to capitalize the first character of a sentence by using the ucfirst() function. You may also want to capitalize the first character of every words for the article title by using the ucwords() function. Here is a PHP script on how to use ucfirst() and ucwords():
<?php $string = "php string functions are easy to use."; $sentence = ucfirst($string); $title = ucwords($string); print("$sentence\n"); print("$title\n"); print("\n"); ?>
This script will print:
Php string functions are easy to use. Php String Functions Are Easy To Use.
2007-04-21, 5138👍, 0💬
Popular Posts:
How To Control Padding Spaces within a Table Cell? - XHTML 1.0 Tutorials - Understanding Tables and ...
How to reduce the final size of an executable file? Size of the final execuatable can be reduced usi...
How To Set session.gc_maxlifetime Properly? - PHP Script Tips - Understanding and Using Sessions As ...
How does multi-threading take place on a computer with a single CPU? The operating system's task sch...
How to measure functional software requirement specification (SRS) documents? Well, we need to defin...