Tips & Tutorials

How to Post Array From HTML Form To PHP (Simple Examples)

Welcome to a tutorial on how to post an array from an HTML form to PHP. The “standard” HTML form fields are easy enough. Just add the name attribute to the fields, submit the form, and that’s it. But what if we want to post an array instead? To post an array from an HTML …

How to Post Array From HTML Form To PHP (Simple Examples) Read More »

4 Ways To Set Execution Time Limit in PHP – Quick Examples

Welcome to a tutorial on how to set the execution time limit in PHP. So you want to change the allowed execution time in PHP to prevent timeout errors on a massive script? There are 4 ways to change the execution time limit in PHP: Change max_execution_time = SECONDS in php.ini. On an Apache webserver, …

4 Ways To Set Execution Time Limit in PHP – Quick Examples Read More »

How To Create Date Range In PHP – Simple Examples

Welcome to a quick tutorial on how to create a date range in PHP. Need to loop through a range of dates, or generate date intervals? There are 2 common ways to create a range of dates in PHP: Using DateTime,DateInterval, and DatePeriod objects. $start = new DateTime(“2020-01-01”); $end = new DateTime(“2020-02-02”); $interval = new …

How To Create Date Range In PHP – Simple Examples Read More »

Simple Memory Management Tips In PHP (With Examples)

Welcome to a quick tutorial on memory management in PHP. Running out of memory from massive scripts? While the easy way is to install more memory into the server, I am pretty sure that is not the most efficient way. We can do simple memory management in PHP, without any complex tools. Use memory_get_peak_usage() to …

Simple Memory Management Tips In PHP (With Examples) Read More »

PHP Escape Characters & Sequences Explained (Simple Examples)

Welcome to a quick tutorial on PHP escape characters and sequences. Trying to figure out how to add slashes and quotation marks to a string? Well, using escape sequences is the answer. Escape sequences start a backslash \, followed by a few characters. They are used to represent special characters that are otherwise impossible to …

PHP Escape Characters & Sequences Explained (Simple Examples) Read More »