Six Cool PHP Tricks You May Not Know

Over the years I’ve come across some useful tricks in PHP that are not obvious, but are worth mentioning. This is not meant to be a comprehensive list of all the useful tricks that you can do with PHP.
1. Count Characters in a String
To do this, I’ve usually just used the function strlen(). However, there is a faster method. Take a look at the following code example:

Read more at PHPBuilder

Comments are closed.