Open Source10 Easy String Manipulation Solutions for Your PHP Development

10 Easy String Manipulation Solutions for Your PHP Development

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

PHP’s massive string manipulation library offers almost 100 native functions for dicing, splicing, parsing and searching text in every imaginable fashion. In fact, PHP has so many string manipulation options that determining the best approach for a particular string-related task can sometimes be difficult. In his PHPBuilder.com article, Jason Gilmore highlights the ideal PHP development solutions to the following 10 common string manipulation tasks.

  1. Determining the Length of a String
  2. Truncating Text to Produce a Summary
  3. Counting the Number of Characters and Words in a String
  4. Parsing a CSV File
  5. Converting an Array into a String
  6. Converting URLs into Hyperlinks
  7. Removing HTML Tags from a String
  8. Comparing Two Strings
  9. Converting Newline Characters to Break Tags
  10. Applying Wordwrap



Read the full story at PHPBuilder:


10 Easy Solutions for PHP String Manipulation

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories