Tagged: PHP


Connect PHP to MySQL

To access the data stored in a MySQL database, you should first connect to MySQL database server. PHP offers two different ways to connect with the MySQL database.


Sending emails using PHP

The PHP mail() function is used to send emails from the script. This function has three mandatory parameters and two optional parameters.


PHP addslashes Function

The PHP addslashes function is used to add backslashes in front of some predefined characters in a string. This function is case-sensitive.


Escape characters in PHP

Escape characters are the equivalent characters for a purpose. The main purpose of using an escape character is to notify the compiler or interpreter, that a particular character is having special meaning rather than it’s normal meaning.


PHP chop Function

The PHP chop function is used to remove white-space or other characters from the right end of a string. This is an alias of rtrim() function and is case-sensitive.


PHP echo() Function

The PHP echo function is used to output one or more strings. As echo is not a real function, you are not required to use parenthesis with it


PHP bin2hex() Function

The PHP bin2hex function is used to convert binary data into hexadecimal representation.


PHP String handling functions

PHP String handling functions can help you to easily manipulate strings. In this article, we’ll cover some of the most commonly used string handling functions in PHP.


PHP Constant

In programming, a constant is a value whose value cannot change during the execution. Unlike variables, the name of a constant doesn’t have a $ sign before its name. A constant name can start with a letter or underscore.