Home >> FAQs/Tutorials >> PHP Script Tutorials and Tips >> Index

PHP Tutorials - PHP Built-in Functions for Strings

By: FYICenter.com

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:

  1. How To Count the Number of Characters in a String?
  2. How Many ways to Remove Leading and Trailing White Spaces?
  3. How To Remove the New Line Character from the End of a Text Line?
  4. How To Remove Leading and Trailing Spaces from User Input Values?
  5. How to Find a Substring from a Given String?
  6. What Is the Best Way to Test the strpos() Return Value?
  7. How To Take a Substring from a Given String?
  8. How To Replace a Substring in a Given String?
  9. How To Reformat a Paragraph of Text?
  10. How To Convert Strings to Upper or Lower Cases?
  11. How To Convert Leading Characters to Upper Case?
  12. How To Compare Two Strings with strcmp()?
  13. How To Convert Strings to Hex Numbers?
  14. How To Generate a Character from an ASCII Value?
  15. How To Convert a Character to an ASCII Value?
  16. How To Split a String into Pieces?
  17. How To Join Multiple Strings into a Single String?
  18. How To Apply UUEncode to a String?
  19. How To Replace a Group of Characters by Another Group?

(Continued on next topic...)

Selected Developer Jobs: