You might need to calculate the date difference in days using PHP. You can easily calculate the days difference by using something like the code below.
I had to get a new notebook yesterday after spilling a cup of green tea on my Macbook pro. I’ve spilled some liquids on it before, but this time the keyboard and trackpad stopped working completely.
I wrote a quick and simple function which allows you to quickly convert arrays to objects. It allows you to change an array like this :
The WordPress get_pages function works similar to the get_posts function which fetches posts from the database by criteria. The get_pages function takes different arguments and allows you to take control of parent and child pages as you execute the function.
Embedding a Quicktime movie player into your webpage work similarly to embedding Flash files, making use of the OBJECT, EMBED and PARAM tags inside your HTML code. You can play .MOV, .MP4 and .MPEG files with the embedded Quicktime movie player.
Have you ever wanted/needed to create a select drop down menu with options divided into sub-sections or groups with labels? See the screenshot below.
Using PHP, you might need to strip the path from a URL, leaving behind just the filename at the end of the URL. You can achieve this with a regular expression pattern of course, but I have a much simpler solution. See the example code below.
I am busy writing a podCast plugin for WordPress and figured that it would be most efficient if I created a Category model which will hold all the podCast feed categories which can be specified in the feed specifically for the iTunes store.