How to generate random character strings in a range in PHP?

Sometimes you may need to generate random strings, such as different passwords. This article tries to show you some tricks to generate different random strings in PHP. The following function acctepts one argument $length which is number of characters on the return word. You can change the arguments to get your need.


PHP: Get excerpt from the text

The following function will extract the excerpt from the given paragraph text. Following function accepts two arguments. $text is the text supplied to be excerpted. $number is the number of words to be returned.

If you have any questions, post below.

Send email in Zend Framework 1

Hello there, I wrote this code recently in Zend Framework to send emails from the application. The following examples are for sending text only email, email with single attachment and email with multiple attachments. Text only email

Email with single attachment The following example is attaching a single PDF file with it. So you […]

WPS Google Analytics

WPS Google Analytics allows you to easilly add your Google Analytics code through out the whole site. Just add your ID, choose if you are on a sub-domain (setting in Google Analytics), and enter the domain. WPS Google Analytics will not track admin users logged-in. To Download Donations Thanks for downloading and installing my […]