Decimals handling in PHP

PHP Round Off Decimal or Convert to Decimal Point
Round Off Decimal
Round a number up or down or Round off a floating decimal point number using PHP’s functions round().
Example. round();

 
 

<?php
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
echo round(5.045, 2); // 5.05
echo [...]

Pagination of Data using PHP-MySQL

Pagination of Data (Paging) using PHP (Hyper Text Pre Processor) and MySQL (the great database)
 
First: Create a table named user_result in your MySQL Server
 

CREATE TABLE user_result(
           user_id INT(5) NOT NULL AUTO_INCREMENT,
           user_name VARCHAR(30),
           math_marks INT(2),
           phy_marks INT(2) ,
           PRIMARY KEY(user_id)
);

 
Second: Insert some large amount of data into the Table. As without large amount of data you [...]