How-to articles, tricks, and solutions about PHP
json_decode to custom class
In PHP, you can use the json_decode() function to convert a JSON string into a PHP object or array.
Remove control characters from PHP string
In PHP, you can use the preg_replace function to remove control characters from a string.
How to implement 'Token Based Authentication' securely in PHPFox?
Here is a general outline of how to implement token-based authentication in PHPFox:
How to output the response HTML data by a jQuery AJAX request?
In a jQuery AJAX request, you can output the response HTML data using the .html() method.
Try/Catch block in PHP not catching Exception
There could be several reasons why a try/catch block in PHP is not catching an exception.
Get max_execution_time in PHP script
You can use the ini_get() function in PHP to get the value of max_execution_time.
PHPExcel Column Loop
To loop through columns in PHPExcel, you can use the following code snippet as an example:
How to delete multiple records using Laravel Eloquent
You can use the destroy() method in Laravel Eloquent to delete multiple records.