Home arrow PHP arrow String Theory

String Theory

You may not know this, but the latest version of PHP comes with avery powerful set of string manipulatation tools. This article takes anin-depth look at these tools and illustrates how they can save you time andeffort in your daily development activities.

TABLE OF CONTENTS:
  1. String Theory
  2. Secret Agent Man
  3. Running Backwards
  4. Getting Into Position
  5. Instant Paralysis
  6. A Quick Trim
  7. Working The Web
By: Vikram Vaswani, (c) Melonfire
Rating: starstarstarstarstar / 13
September 20, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
If you're anything like me, your acquaintance with PHP's string functions is pretty limited. Sure, you know how to echo output to the screen, and you can even handle things like string concatenation and tokenization. But do you know how to format a string before inserting it into a database, or display decimals in a user-friendly format?

Well, fear not - over the next few pages, I'm going to be taking an in-depth look at the powerful string manipulation tools PHP gives you for free. I'm going to introduce you to the wonders of string concatenation and repetition, string reversal, string comparison, string search-and-replace operations, and string formatting...all in the next ten minutes.

You're probably wondering why you need to know this stuff. For most general development activities, you don't - echo() and print() will do just fine, so long as you're not planning on doing any serious string manipulation. But if you ever find yourself needing to slice and dice strings lengthwise in order to cook them into something completely different, you're going to be glad you read this article. As a PHP developer myself, I was elated to add some new and interesting weapons to my PHP armory while researching this article...and quite distressed that it had taken me so long to find them.

In addition to providing a gentle introduction to PHP programming in general (and PHP string manipulation in particular), this article will offer you a broad overview of PHP's string manipulation capabilities, serving as both a handy reference and a tool to help you write more efficient code. Regardless of whether you're new to PHP or if you've been working with the language for a while, you should find something interesting in here.

Let's get started!

 
 
>>> More PHP Articles          >>> More By Vikram Vaswani, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: