Browse all snaps

Create Back Button with JavaScript

You may create a back button like your browser has. The following script allows the…

Get File Path Data in PHP

You may retrieve all needed file path data using PHP's built-in function pathinfo. You don't…

Automatic Password Generation in PHP

Sometimes you need to generate passwords for customers automatically when a new account is created.…

Base64 Encode and Decode String in PHP

Encodes the given data with MIME base64. Base64-encoded data takes about 33% more space than…

Remove Last Character from String in PHP

This is a very common PHP question of HOW TO remove last character from string…

Highlight PHP Code

This function highlight_string() outputs or returns a syntax highlighted version of the given PHP code…

Send Mail using mail function in PHP

The mail() function allows you to send emails directly from a script. Remember, that most…

Get short urls for Twitter with PHP

If you work with Twitter, you probably use a url shortener such as tinyurl.com or…

Highlight specific words in a phrase with PHP

You may use this code to highlight specific words in your displaying search results.

SEO friendly links in PHP

This code removes all special characters from the given URL and make it SEO friendly.