iam doing division of these two columns $row['col1']/$row['col2'] iam getting value as 0.0042553191489362
How do i round up the value so that i can get as 0.42%
iam doing division of these two columns $row['col1']/$row['col2'] iam getting value as 0.0042553191489362
How do i round up the value so that i can get as 0.42%
You can use the round built in function:
$myFloat = $row['col1']/$row['col2'];
$result = round($myFloat, 2);