How to Export SQL EXPLAIN as JSON

One way of finding slow SQL queries is to use the built-in EXPLAIN function, but it's default output is not easy to read. Here's how to export it as a more readable JSON output.

March 16, 2020by

PHP: Date from Week Number

Here's how to get the first date of any week number using one single row of PHP code.

February 9, 2020by

PHP: Replace First Occurance Only

Have you ever wanted to replace a word in a text string, but not all occurances but only the first or last? Here's a script that will do just that.

December 29, 2019by

How to Change the Time Zone in PHP

Time zones can be a real pain, and that's even without having to switch between them. Here's a quick tutorial on how to convert time zones using the PHP class DateTime.

June 27, 2019by