The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.
$date1 = date(‘Y-m-d’);
$date2 = ‘2006-07-01’;
$days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24);
echo “Number of days since ‘2006-07-01’: $days”;
define (“MYCONSTANT”, 100);
urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits.
urlencode(“10.00%”) will return “10%2E00%25”. URL encoded strings are safe to be used as part of URLs.
urldecode() returns the URL decoded version of the given string. Continue reading