PHP Archive

CakePHP : Change view file from controller

With CakePHP, the controller core automatically detects the file name of the view file which needs to be rendered from a controller action. You might want to reuse an existent view for an action or specify a different file name. Stats Stopped Working

I recently integrated a blog and documentation base into the website and noticed after a few days that my stats stopped working completely after switching the theme.

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

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.

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.

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.

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.

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 :

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.

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.

Pin It on Pinterest

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!