A gotcha with PHP’s PDO::FETCH_CLASS

PHP’s PDO has a nifty way of fetching database records into an object, but there’s a slight gotcha when also using a constructor which initializes the class properties.

Categories PHP

Remove extension from a filename with PHP

If you’ve got a filename that you need to remove the extension from with PHP, there are a number of ways to do it. Here’s three ways, with some benchmarking.

Categories PHP

CSS cursor property

Occasionally I’ve needed to specifically make the mouse a hand with HTML and CSS when mousing over a particular area and I’m always forgetting the property used to set it, so this quick post is for my own quick reference, and shows example of the other property values too. cursor: pointer To make the mouse …

Read more

PHP PDO class to set the MySQL auto_increment_increment

A few days ago, I posted how to temporarily change the auto increment increment in MySQL. This post has an extension class to PHP's PDO to get the current auto increment value, change it to a new value and then reset it back to the original.

Feedly icon appearing over web pages

Feedly Mini shows a Feedly icon bottom right of all web pages in Google Chrome when the Feedly plugin is installed and enabled. This post shows how to disable the icon from appearing.