You can buy the eBook on Leanpub or sign up to get a coupon code to download it for FREE!
In programming, we use loops to iterate over data. This can be useful for transforming individual elements in an array, validating input data, sorting, and many other things. PHP offers several methods for looping over data arrays. “for” Loops The for loop offers space for up to three parameters: the initial value, the condition, and the inc... Read more 09 Oct 2017 - 2 minute read
Functions are one of the basic building blocks of any programming language. They allow you to define blocks of code that can be called many times in many places throughout your program. Functions are great for reusability, but they also help make code more concise and easier to read. Let’s look at some examples. Using built-in PHP functions ... Read more 09 Oct 2017 - 2 minute read
To write a PHP command line script, you will need PHP installed on your Mac, Windows, or Linux machine, a terminal command line tool like Bash, and a text editor like Sublime. To write a command line script in PHP, open up a new blank file your favorite text editor. Add an opening <?php tag to the very beginning of the new file. On ... Read more 09 Oct 2017 - less than 1 minute read
Arrays are widely used in PHP to store groups of data when an object or string will not suffice. Those familiar with other languages may equate PHP’s arrays to dictionaries, lists, collections, or stacks, but essentially a PHP array is a reliable key-value storage system in the language. Let’s look at what an array can do in practice. Creatin... Read more 09 Oct 2017 - 3 minute read
A common function for most web applications is uploading and storing files from users. Doing this securely and reliably can be a challenge, but there are a couple options if you’re using PHP. 1. Use a File Upload Service If you want to ensure that your file uploads are securely and reliably stored no matter what web hosting environment you u... Read more 09 Oct 2017 - 3 minute read