Home >> FAQs/Tutorials >> PHP Script Tutorials and Tips >> Index
PHP Tutorials - PHP Built-in Functions for Strings
A collection of 19 tips on manipulating PHP strings. Clear answers are provided with tutorial exercises on string functions including strlen, trim, substr, chop, strpos, strcmp, split, etc.
Topics included in this collection are:
- How To Count the Number of Characters in a String?
- How Many ways to Remove Leading and Trailing White Spaces?
- How To Remove the New Line Character from the End of a Text Line?
- How To Remove Leading and Trailing Spaces from User Input Values?
- How to Find a Substring from a Given String?
- What Is the Best Way to Test the strpos() Return Value?
- How To Take a Substring from a Given String?
- How To Replace a Substring in a Given String?
- How To Reformat a Paragraph of Text?
- How To Convert Strings to Upper or Lower Cases?
- How To Convert Leading Characters to Upper Case?
- How To Compare Two Strings with strcmp()?
- How To Convert Strings to Hex Numbers?
- How To Generate a Character from an ASCII Value?
- How To Convert a Character to an ASCII Value?
- How To Split a String into Pieces?
- How To Join Multiple Strings into a Single String?
- How To Apply UUEncode to a String?
- How To Replace a Group of Characters by Another Group?
(Continued on next topic...)