Absolute Value Program in PHP Function

Absolute Value Program in PHP Function. Php program to print the absolute number (abs). Using this program we can print the absolute number in PHP program. Absolute value refers to a number’s distance from zero on the number line, without taking direction into account. A number’s absolute value can never be negative. Consider the following examples. The number 5 has an absolute value of 5. The difference between 5 and 0 is 5 units.

<?php 
echo (abs(-100)."<br/>");
?>

 

Output:

100

Absolute Value

Absolute value refers to a number’s distance from zero on the number line, without taking direction into account. A number’s absolute value can never be negative. The absolute value or modulus of a real number  | x | is its non-negative value, regardless of its sign.

Break Statement in PHP

In an HTML document, the <br/> tag signifies a line break. Similarly, the <br/> element comes in handy for crafting poems and addresses. This <br/> tag is used to insert a line break or carriage return within a parent element, such as a paragraph, without causing the parent element to break out.