Download Free Templates Joomla! 3

Passing Arguments By Value in PHP

Passing Arguments By Value

Passing Arguments By Value   When the argument is passed by value, the value of the argument remains unchanged outside the function. The arguments are prefixed with the dollar ($) sign in the function definition to indicate that the argument will be passed by the value. Some of examples of passing …

Read More »

User-Defind Functions in PHP

User Define Functions

User-Defind Functions in PHP   A user can also define a funtion. A function has to be defined before it is used. The function definition contains the code for the function.The syntax to define a function is: { code } The function keyword is followed by the function name, in …

Read More »

Error Handling Functions in PHP

Error Handling Functions

Error Handling Functions in PHP   Error Handling is the process of dealing with errors as they arise during the run-time. PHP provides us with the error handling functions to define the error handling rules. Lists and decribes some of the error handling functions. Function Name | General Form | Description  …

Read More »

Date And Time Functions in PHP

Date And Time Functions

Date And Time Functions   The data and time functions enable us to find the data and time on the system. lists and describes some of the data and time functions. Function name General form Description   Checkdate(month,day,year) | returns the value as 1 if the specified date is valid. It …

Read More »

String Functions in PHP

String Functions

String Functions in PHP   String functions operator on character type of data.   Function Name – General Form | desicription chr(ascii) – Returns the character equivalent to the specified ASCII code. bin2hex(string) Returns ASCII value as the hexadecimal representation of the string. strtolower(string) | Converts the specified string to the …

Read More »

Built-in Functions in PHP

Built-in Functions

Built-in PHP Functions   PHP provides us with some built-in functions. We can categories these built-in functions into: > Mathematical Functions > String functions > Date and time functions > Error Handling functions > Database Functions > Array Functions > Mail functions Built-in function are placed in the PHP script.

Read More »

Mathematical Functions in PHP

Mathematical Functions

Mathematical Functions in PHP   Mathematical functions operate on numerical data. | Function Name| Syntax | desicription | | Abs | abs (arg) | Returns the absolute value of the argument | |     max | max(arg1,arg2,…) | Returns the largest value from the specified  arrays | Min | min(arg1,arg2,….) …

Read More »

Jump And Break Statement in PHP

Jump and Break Statements

Jump And Break Statement in PHP   The jump statements control the execution of the loop statements. PHP provides the following jump statements: > Break Statement > Continue statement > exit statement Break Statements: The break statements stop the execution of the loop. The control is then passed either to …

Read More »

Do-While Loop in PHP

Do-While Loop

Do-While Loop in PHP   In a while loop, the condition is evaluated at the beginning of the loop. if the condition is false, the statement in the loop body are not executed at all.if we want to execute the loop body at least once, we must use the do-while loop. …

Read More »

Exit Statement in PHP

Exit Statement

Exit Statement in PHP   The exit statement ends the loop and the control is passed to the statement following the loop body. For example, to calculate the HRA. <?php $salary=8000; if($salary<6000) { echo “Basic : $salary <BR><BR>”; echo “Employee having salary below 6000 are not entitled to receive HRA.”; …

Read More »