PHP Archive
05 Aug 2008
PHP: Increase memory limit
Have you ever received a fatal error on your server similar to the one below when you tried to execute a script? The fatal error shown below, indicates that your PHP configuration has a memory limit set and the script which you are executing is trying to allocate more memory than what is available for
28 Jun 2008
WordPress : Using jQuery library with your plugin or theme
When you develop a WordPress plugin or theme, you might want to make use of the jQuery library included and distributed with the WordPress package.
25 Jun 2008
WordPress : Translate a Plugin
First off, you have to know that not all WordPress plugins can be translated. The plugin developer(s) had to take the necessary steps such as using the WordPress __() and _e() functions and load_plugin_textdomain() in order to parse the strings/text of the plugin through the localization system.
21 Jun 2008
WordPress : Using Javascript libraries with your plugin or theme
When you develop a WordPress plugin or theme, you might want to make use of some of the Javascript libraries distributed with the WordPress package such as Prototype, Scriptaculous and jQuery.
17 Jun 2008
PHP: Date difference in days
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.
06 May 2008
PHP : Array to Object
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 :
04 May 2008
WordPress : get_pages
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.
26 Apr 2008
PHP : Strip filename from a URL
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.
17 Apr 2008
CakePHP : Form Radio Default Checked Value
With the CakePHP FormHelper, you can output a set or a list of radio button widgets.
28 Feb 2008
CakePHP Crontab
Due to the way that CakePHP rewrites URL requests with its router, it might seem confusing to execute a Crontab to run a controller action. I will show you how to set up a cron dispatcher so that you can execute all your different controller action schedules on a single file and pass the controller

