This is an archival post from my newsletter. Join the newsletter to get in the loop.

PHP Accessing Strings as Array’s

A tip that relates to below. I find that developers often forget that you can access strings as arrays. This comes in handy for finding a specific character in a specific point in a string. For example, when looping over a list of files using:

if($filename{0} != '.'){
.... not a hidden file

                    <br /> Will keep you from getting a bunch of hidden files or the '.' && '..' directories. Make sure to note that you have to use curly brackets and not square brackets.

Join my mailing list

Join my mailing list and get a copy of my ebook, Securing the Five Figure Sale, for free. Instantly.