Random String
11
Creates a random string, usefull for passwords etc.
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
8
Strip HTML Tags From a String
-4
Strip HTML Tags From a String
5
Return a Portion of a Character String
8
This function simply splits a file based on the splitter supplied and returns an array with the values. It's pretty much like the file() function. This script could be helpful in section editings.
7
Turns any string backwards. If you input "Test" it gives out "tseT". Hope it's useful.
The snippet shows how to use it.
The snippet shows how to use it.
10
This simple function simply removes the character at the given index from a string.
NOTE: The count starts from 0
NOTE: The count starts from 0
10
Adds any character at the given index of a string.
NOTE: Count starts from 0
NOTE: Count starts from 0
12
Over the summer, I worked on a project in which I needed to parse logfiles which were in the following format:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
6
A simple page hits counter that uses a single cookie to tell the user how many times they have visited the page.









