Register Your Own Autoload Functions

PHP has a few in-built magic method __get(), __set(), __sleep(), __toString() etc. These functions are all really useful but they are not used very often in your day-to-day development, but one magic method is really useful this is the __autoload() function. This function is automatically called each time you try to instantiate a class but the class can not be found. When you normally call a class to use in

Read more...

Remove Characters At Start And End Of A String In PHP

In a previous article about how you can remove whitesapce from a string I spoke about using the functions ltrim() and rtrim(). These work by passing in a string and they will remove the whitespace. Using the ltrim() function it will remove the whitespace from the start of the string, using the rtrim() function will remove the whitespace from the end of the string. But you can also use these

Read more...

Store HTML View File In A Variable

If you have used a MVC language before you would be familiar with the practice of separating your business logic from your HTML. The way this works in MVC language is that the framework will allow you to assign a view (HTML) to a controller (class). When the controller is instantiated it will have an action to display the view with the HTML for the page. Included with the separation

Read more...

Remove Automatic Paragraphs In Shortcodes

This post is an extension to the post I wrote some time ago about displaying code snippets on a WordPress site. This post showed how you can create a WordPress plugin which makes a shortcode for a number of different languages which will encode the content so that you can display code snippets on your WordPress site. Using this plugin you will have access to 4 shortcodes html, css, javascript

Read more...

Hash Passwords With PHP 5.5

Almost every PHP developer would have to build an application that relies on a user login. This will involve the user of the website having a Username and Password which is stored in the database so they can login into your website. As passwords are stored in the database it is important that you hash these passwords before you store them in the database. A password hash is a one

Read more...

WordPress 3.6 Oscar Released

The latest release of WordPress 3.6 has now been released, it has been in the making for some time now and has come with a number of great updates. All of the new WordPress versions are names after famous musicians and this release is named after the Jazz pianist Oscar Peterson. Here is a video to demonstrate the new features of WordPress 3.6.

Read more...

Free Premium Files For August 2013

Each month the Envato marketplace brings you free premium standard files. Envato is a web marketplace where you can get premium files for different areas of your website. My favourite marketplaces is the script marketplace CodeCanyon and the theme marketplace ThemeForest. Here are the files which you can get for free for August 2013. Minimal Transparent Menu

Read more...

Create Password Strength Indicator With jQuery

With security being the biggest problem for most websites it's important to make websites as secure as possible. But after all the precautions a developer can do with their code most of the problems with a website is simply the user didn't have a strong password. If you a building a system that allows the user to enter in their own password then it is always a good idea to

Read more...

Speed Up HTML Coding With Emmet

Web Developers are always looking for new ways to speed up their development process, one the best ways to speed up development and becoming more productive is to choose the right IDE. I've tried a lot of IDE's but he one that I find myself most productive with is with sublime text, this is because the speed I can do different tasks. Much of this performance comes from the massive

Read more...

Import And Export A Database Using Command Line

The following code snippets will allow you to import and export a large database using SSH commands. To get SSH access to your hosts server you will need to contact your current web hosting company. If you are on a shared hosting package you may not be allowed to have SSH access to your hosts server. To run both of these commands you will need to have MySQL installed on

Read more...

1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 62