Category: PHP

0

PHP do-while loop

The main difference between a while and do-while loop is that in a do-while loop, the statements in the loop will be executed at least once.

0

PHP while loop

A while loop is used to repeatedly execute a set of statements as long as the condition remains true.

0

PHP foreach loop

Unlike a for loop, the PHP foreach loop works only with arrays and objects. The foreach loop starts with the first element of the array and during each iteration, the next array element is fetched.

0

PHP for loop

A for loop is used to execute the program for a fixed number of times. For loop in PHP is similar to that in C, C++ or Java.

0

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.

0

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.

0

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.

4

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.

0

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