I wanted to list a directory in PHP. At the same time, I wanted to make sure only files are listed – not subdirectories or dot directories. More specifically, I only wanted to include files with the...
Learn MoreImagine you have a HTML form with several values and two buttons at the bottom. One could say “Do This” and the other “Do That”. How do you know which one was pressed by the user?...
Learn MoreI’ve just realised how (relatively) easy it is to make PHP create a ZIP Archive from a directory and its sub directories. Previously I had relied on the Linux Shell Command zip or tar to do this which...
Learn MoreIt’s extremely easy to add elements to an existing array in PHP – so easy in fact that I regularly forget how to do it! I’m used to initialising and setting up my variables from Objective C,...
Learn MoreYou may need to know which of your themes are child themes, or in fact if the current theme you’re using is a parent or a child theme. Here’s how you can test both options. The following code...
Learn More