How-to articles, tricks, and solutions about PHP
How to "flatten" a multi-dimensional array to simple one in PHP?
In PHP, you can use the "array_reduce" function to flatten a multi-dimensional array.
How to access mysql result set data with a foreach loop
To access MySQL result set data with a foreach loop, you can use a loop like the following:
How to access the php.ini from cPanel?
To access the php.ini file from cPanel, you can follow these steps:
How to add 5 minutes to current datetime on php < 5.3
You can use the strtotime function in PHP to add a certain number of minutes to a date and time.
How to add a print button to a web page
To add a print button to a web page using PHP, you can use the following steps:
How to add text to an image with PHP GD library
Here is an example of how you can add text to an image using the PHP GD library:
How to alias a table in Laravel Eloquent queries (or using Query Builder)?
To alias a table in a Laravel Eloquent query, you can use the as method on a DB facade.
How to assign an array within a smarty template file?
In a Smarty template file, you can assign an array to a variable using the assign function.
How to benchmark efficiency of PHP script
There are several ways to benchmark the efficiency of a PHP script, including: