Filter By Category - Php


Here's some of my tips, tweaks and tuts, ranging from PHP, Linux, MySQL and more!

Snippets / PHP

Strip non-alphanumerical characters with PHP

In the past, when I first started using PHP in order to filter out bad characters for file uploads, seo friendly URL names and other things I created an array of bad characters. This is obviously not an ideal situation as the amount of characters that people or scripts can inject is ridiculously high, so adding a new element ...

14th Jul, 2011 | » Read more Snippets like this | » Read More

Snippets / PHP

Replace URLs with links - PHP

Technologies: PHP, HTMLDifficulty: EasyTime: 5 minutes Where I work, we develop many websites that have blogs and news sections. Often we allow users to add their own HTML snippets into the content of the articles in order to enhance the look and feel of the story. The Problem We often find that different users have different lev...

6th Jul, 2011 | » Read more Snippets like this | » Read More

Snippets / PHP

Loop through the Alphabet with PHP

Difficulty: EasySnippet Length: 1 minuteTechnologies: PHP, HTMLI have several times wanted to provide a client with a facility to filter data by an alphabetic character and have done so by manually typing each letter of the alphabet with a hard link for example.Old Way A | B | C | D | E | F | G | H | etc... ...

15th Mar, 2011 | » Read more Snippets like this | » Read More

Snippets / PHP

Personalised PHP debugging

Snippet Length: 10 minutesKnowledge Required: PHP, HTMLDifficulty: Basic-Intermediate There are many situations where you find yourself fixing errors in php pages, a great way to fix it quickly would be to debug your code logically and methodically. One way to do this is to build your own debugging and error display function An E...

28th Feb, 2011 | » Read more Snippets like this | » Read More