how to implement calculation of percents:
$y = 100\$x; // 3.333..
$x*$y - and here I need to get 100 without Observational error
Your backslash is not a division symbol. You must use division
/ symbol. Here's an example using
number_format() to round to the hundredths position.
$x = 3; $y = 15; $percent = $x/$y; $percent_friendly = number_format( $percent * 100, 2 ) . '%';