Oct 6
How to extract numbers from a string (text)
This is a short function that extracts numbers from a string
Oct 6
Make an alphabetical selection from elements of an array
Here’s a snippet that extracts elements from an array starting with a specific letter (alphabetical search).
Oct 6
Equivalent of trim() function for arrays
This function strips the null element values from the beginning and ending of an array.
Oct 6
Randomize text letters while keeping the words readable
This is a function that converts a normal text into a scrambled one, but still readable.
Oct 3
Creating a Tag Cloud
This is a short tutorial that will give you an idea of how to create a Tag Cloud and implemented it the pages of your website.
Oct 3
Display values from an array in random order
This is a function that randomizes the order of the elements in an array.
Oct 3
Cropping a rectangle image to square using GD
This is a PHP Class that crops images (rectangles) to squares using the GD library.
Oct 3
How to remove a (non-empty) directory
Here’s a snippet that can help you to remove a non-empty directory from the server. It’s a recursive function that deletes the directory with its files, folders and sub-folders.
Oct 3
How to resize an image (on the fly) and keep its aspect...
This is a PHP Class useful if you need to resize images keeping their aspect ratio, using the GD Library. The new height is calculated proportionally to the new width's size and reverse. For instance you have an image with the following dimensions: width - 1000, height - 800. Its thumbnail with a width of [...]
Sep 26
Shorten a string (text)
This is a function which shortens a text. For instance, this is useful when you want to display in a page excerpts from your articles (with the link to the full article).
Sep 26
Show random image(s) from a directory
This script is useful if you need to randomly select images from a directory.
Sep 26
How to convert smilies to graphics
This is a function that modifies a text (comment) by converting the emoticons like , , (Y) etc. to graphic icons.
Sep 25
Advanced IP Ban Script
This script is useful if you want to restrict the access to some people on your site, based on their IPs. There are 2 lists which can be used: one which has a list of the IPs you want to ban and one which you can use to ban a range of IPs. The script [...]
Sep 25
Submit a form without page refresh using JQuery & AJAX
The aim of this tutorial is to help you to create a simple (tableless) contact form using AJAX, JQuery & PHP. We will have a HTML page which will contain the form, a CSS file, a php page where the data will be sent and another file where the validation function(s) will be located.