by Shashi Dhar Kumar | Feb 13, 2010 | PHP, Programming
The Substr () PHP Function is used to return part of a string. It is written as substr (string, start, optional length);.The string is whatever string you want to return a portion of. The start is how many characters in to skip before starting. Setting this to 3 would...
by Shashi Dhar Kumar | Nov 10, 2009 | Programming
echo is faster than print. Wrap your string in single quotes (’) instead of double quotes (”) is faster because PHP searches for variables inside “…” and not in ‘…’, use this when you’re not using variables you need evaluating in your string. Use sprintf instead of...
by Shashi Dhar Kumar | Nov 10, 2009 | PHP, Programming
I have come across code that checks for empty or null values, or if a variable is set. Many of these checks fail as the wrong function is being used to assert the correct value. While it is important to be checking values, it is equally important to understand the...
by Shashi Dhar Kumar | Nov 10, 2009 | PHP, Programming
Contents Types Casting Cast to string Cast to int Cast to binary (PHP6) Cast to unicode (PHP6) Cast to boolean Cast to object Cast to float Check for Type Check String Check INT Check Array Check Object Check Float Check Double Check Real Check Bool Check Buffer Check...
by Shashi Dhar Kumar | Sep 4, 2009 | PHP, Project
This chapter explains how to send email in php. We will upload advanced mailing script in php soon. Download the script : Simple email script in PHP