I am doing an equation and the outcome is 45.454545454545454545.

I would like to get rid of the 45454545 after the decimal point. and have 45%

$final=5/11*100;

you need to use the PHP int() function:

$final=5/11*100;
$integer = (int)$final;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.