Mar 13, 2010

PHP String Functions

Following are the few PHP string functions which you will use frequently.

1. How to remove white space from the beginning or end of a string in PHP.
ltrim( ), rtrim( ), trim( )

2. How to read CSV File in PHP
fgetcsv( )

3. How to convert string to array in PHP
explode( )

4.  How to wrap text in PHP
wordwrap( )

5. How to capitalize or convert to lowercase in PHP
ucfirst( ), ucwords( ), strtolower( ), strtoupper( )